PDA

View Full Version : My mysqld broke


domino
28th September 2005, 13:11
I updated update PHP and I think it updated something mysql. Here is the error message. How can I fix it?
Starting MySQL database server: mysqld...failed.
Please take a look at the syslog.
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

falko
28th September 2005, 13:51
I updated update PHP and I think it updated something mysql. Here is the error message. How can I fix it?
Starting MySQL database server: mysqld...failed.
Please take a look at the syslog.
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

Does /var/run/mysqld/mysqld.sock exist?
Run
updatedb
locate mysqld.sock
to find out where your mysqld.sock is. Maybe its name is mysql.sock instead of mysqld.sock...

domino
28th September 2005, 13:57
locate mysqld.sock resulted in not found. I ran locate mysql.sock and came up with:

/var/lib/mysql/mysql.sock

domino
28th September 2005, 14:25
Okay, I kinda fixed the proble. I had a copy of the original my.cnf. So i renamed the current one to my.cfg.1 and rename the my.cnf_orig to my.cnf.

Restarted mysqld and it spat out:
server1:/etc/mysql# /etc/init.d/mysql start
Starting MySQL database server: mysqld.
Checking for crashed MySQL tables in the background.
So I guess it works now?

falko
28th September 2005, 14:33
Seems to be so...

exorcist
15th April 2006, 20:27
Got the same problem.

'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

The mysqld.sock doesn't exist.


I have Feather Linux. But i don't have orgininal from my.cnf....

:(

falko
16th April 2006, 16:16
Can you restart MySQL and then run
updatedb
locate mysqld.sock
locate mysql.sock
What's the output of the two locate commands?

22hosting
18th April 2006, 11:59
What you need to do is SIGKILL your mysqld and then remove the my.cnf from /etc/ and then restart mysqld without the my.cnf file and you should be fine.

CMD Expected shortly.


Update :

This line will do the trick for you
kill -9 `ps ax | grep mysqld | tr -s ' ' |cut -d' ' -f1`
*NOTE: you will get a failure as it also thinks the grep is a running process*

then rm /etc/my.cnf

then mysqld restart
________
Asian live (http://www.girlcamfriend.com/webcam/asian-girls/)

nyloxy
28th April 2006, 02:45
We had the same problem for my coppermine server. Everything was fine until the box had to be shut down several times because of airconditioning loss in the server room over the last 2 days! During the last reboot had the same:

'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

We tried everything including: permissions on /var/run/mysqld/ , commenting out 'old passwords = 1' in my.cnf, checking for *.sock in another directory, etc...

Then, after looking over all of the different posts I renamed 'my.cnf' to 'my.cnf.old', tried to start mysql daemon again (wouldn't start...couldn't find the my.cnf), then I renamed my.cnf again, restarted - - everything was back up and running!! :D

Our conclusion is that the my.cnf file may have been corrupt due to the shutting down/starting up that ensued over the last few days (Damn A/C compressor unit kept freezin' up!!), and by re-copying it was corrected. Very strange. :confused:

But, happy not to have to run to the tape library and go thru a restore! :( Yuk to that!

javirebu
22nd May 2007, 12:57
In my case, aborting database back up results in:
"Starting MySQL database server: mysqld...failed.
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' '
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!"


/var/run/mysqld/ as empty, yes... mysqld failed starting...

I tryed to apply all possible solutions of this post, and nothing...

Finally, with adept, I uninstalled mysql-server5 and install again, and the problem was fixed, and no database lost, all ok.

Thanks for share your experiences and solutions. :D

Emran
9th October 2008, 08:42
Hi, I am facing error that you have addressed when i run this command.....

[root@localhost Server]# mysqladmin -u root password mysqldata
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
I have executed your given commands, here is output....
[root@localhost Server]# updatedb
[root@localhost Server]# locate mysqld.sock
[root@localhost Server]# locate mysql.sock
[root@localhost Server]#
Kindly advise me... as i am totally stucked!

falko
10th October 2008, 14:57
Please restart MySQL.

Emran
12th October 2008, 06:56
Thank you, for your reply.
Actully mysql server was not installed. only i have installed "mysql client".
After installing mysql server i was able to interact with it.

Emran.