![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MySQL article - Sun and MySQL: How It Stacks Up for Developers | iBot | UNIX and Linux RSS News | 0 | 02-28-2008 08:20 PM |
| MySQL conflicts with mysql-3.23.58-16.RHEL3.1 | johnveslin | Linux | 2 | 07-17-2007 03:49 AM |
| Mysql problem | 12yearold | Shell Programming and Scripting | 1 | 07-12-2006 02:05 AM |
| mysql would not start: missing mysql.sock | xnightcrawl | UNIX for Advanced & Expert Users | 2 | 05-26-2006 07:06 AM |
| Problem with PHP and MySQL | Danny_10 | Shell Programming and Scripting | 11 | 04-29-2004 07:55 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
MySQL problem >> missing mysql.sock
MySQL on my server is down....
I figured out that the mysqld process isn't running. When I try to run it, it says it can't find mysql.sock Any suggestions? Here's what I can't do: can't be root don't have physical access (do stuff via SSH) reinstall MySQL (need to keep the current MySQL databases) I would also like if someone could post their mysql.sock file, I think that manually creating one will work. Also, I don't want to do touch mysql.sock to create the file because I think that wouldn't work. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
run ./configure --help to get to see where you can set
the sock file for mysql. For recent versions of PHP, you can use "localhost:/path/to/mysql.sock" in your mysql_connect call to tell it where to find the socket. |
|
#3
|
|||
|
|||
|
Nobody can post you a mysql.sock file, it's a Unix domain Socket file which you _can't_ replicate.
Where is MySQL installed, have you tried running safe_mysqld? Try executing "safe_mysqld &" from the directory that MySQL is installed in to execute MySQL. |
|
#4
|
|||
|
|||
|
I have tried it. I start it and then I get bunch of errors that say like Access denied....
|
|
#5
|
||||
|
||||
|
this is a little bold to try out,
shutdown mysql server manually remove the mysql.sock file in /var/lib/mysql or whatever directory. try restart the server. please revert back if that works |
|
#6
|
||||
|
||||
|
You have to start your mysqld.
If your mysqld is not running you will get a missing mysql.sock file error. Maybe your user name to login to mysql in not correct. MySql has a default user name. Unix and MySql have nothing to do with each others user names. Without proper user name login, I get this: ------------------------------------- # bin/safe_mysqld --log & 1168 # chown: unknown user id mysql Starting mysqld daemon with databases from /usr/local/mysql/mysql-3.23.52/data 020926 22:24:22 mysqld ended # bin/mysqladmin version bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) ' Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists! --------------------------------------------- Try something like: shell> bin/safe_mysqld -u user_name & Where user_name is your MySql login name. To see if mysqld is running type: Shell> bin/mysqladmin version You should see something like: Running threads: 1 |
|
#7
|
||||
|
||||
|
mysql.sock is required for mysqld processes to operate. For example, if your mysql.sock file exists in /tmp and you decide to delete all the 'temp files' you will have a problem with mysql
You should make sure you know which directory that the mysql.sock file is created and make sure the mysqld processes have permission to write to that directory... and make sure that prior mysql.sock files are either deleted or have correct permissions so when another process is started it can overwrite this file. For example: Quote:
My advise is to find out where your system is writing this file, shutdown mysql, delete all the old mysql.sock files, check permissions and restart. |
||||
| Google The UNIX and Linux Forums |