LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-31-2006, 08:40 AM   #1
zoli_stir
LQ Newbie
 
Registered: May 2006
Distribution: OpenSUSE 10.1
Posts: 3

Rep: Reputation: 0
MySQL Socket


I've installed mysql and when I try to use it, it says that 'Can't connect to local MySQL server through socket /var/lib/mysql/mysql.sock
I've checked and the file doesn't exist. How do I create it? Or do I have to create it manually. If yes then what do I write in it?

Ok I looked after it I start it with 'mysqld_safe &' and it gives me the following message:

[1] 20497
dyn-86:/home/zoli # touch: cannot touch `/usr/local/var/dyn-86.err': No such file or directory
chown: cannot access `/usr/local/var/dyn-86.err': No such file or directory
Starting mysqld daemon with databases from /usr/local/var
/usr/local/bin/mysqld_safe: line 376: /usr/local/var/dyn-86.err: No such file or directory
/usr/local/bin/mysqld_safe: line 384: /usr/local/var/dyn-86.err: No such file or directory
STOPPING server from pid file /usr/local/var/dyn-86.pid
tee: /usr/local/var/dyn-86.err: No such file or directory
060531 17:04:22 mysqld ended
tee: /usr/local/var/dyn-86.err: No such file or directory

Last edited by zoli_stir; 05-31-2006 at 09:04 AM.
 
Old 05-31-2006, 08:45 AM   #2
spirit receiver
Member
 
Registered: May 2006
Location: Frankfurt, Germany
Distribution: SUSE 10.2
Posts: 424

Rep: Reputation: 33
You must make sure that mysqld is running.
 
Old 05-31-2006, 09:42 AM   #3
GL1800
Member
 
Registered: Jun 2005
Location: Lilburn, Ga
Distribution: FC5
Posts: 175

Rep: Reputation: 30
This is pretty common, where you expect to see the socket, just create a link to the real one, which can be found with a locate. You will need something like ln -s /the/real/socket mysql.sock
 
Old 05-31-2006, 09:50 AM   #4
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Quote:
STOPPING server from pid file /usr/local/var/dyn-86.pid
I agree with Spirit_Receiver. If the mysqld server isn't running, how can you expect the client to connect to it?

To fix all the "No such file or directory" errors, make sure that the directory
/usr/local/var exists and is writable to the user that MySql runs under.
 
Old 05-31-2006, 10:49 AM   #5
spirit receiver
Member
 
Registered: May 2006
Location: Frankfurt, Germany
Distribution: SUSE 10.2
Posts: 424

Rep: Reputation: 33
Hey, you're cheating. You changed your first post considerably.

Now that I know you're using SUSE, I can make the following suggestion: If you want to start the server manually, su to root and use the command "rcmysql start". Then you should be fine.
Alternatively, you can also use YaST to specify the runlevels in which mysqld should always be started automatically. See YaST->System->Runlevel-Editor.
 
Old 05-31-2006, 11:55 AM   #6
zoli_stir
LQ Newbie
 
Registered: May 2006
Distribution: OpenSUSE 10.1
Posts: 3

Original Poster
Rep: Reputation: 0
Thnx I fixed it from YAST.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 07:19 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
can't connect to mysql through socket '/tmp/mysql.sock' Boby Programming 2 05-23-2004 01:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration