0
Every time when I restart the server, booting the system I have to the following error:
database error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I can solve it by doing the following commands
service mysqld stop
su -c '/usr/bin/mysqld_safe --skip-grant-tables --user=root &'
mysqld -u root mysql
update mysql.user set password=PASSWORD("my_password") where user='root';
flush privileges;
exit;
So what is the reason that at every system boot I have to run these commands? and how to save these settings forever?
Thank you.
Can you confirm thqt the mysql.sock file exists? Maybe its being deleted at boot? – Ryan Griggs – 2014-06-21T17:30:53.273
let me check that – CEO at Apartico – 2014-06-21T17:35:47.127
@RyanGriggs yes, I confirm. mysql.sock file being deleted at boot. – CEO at Apartico – 2014-06-21T17:43:48.103
Here's a really dumb question, but can you confirm that mysqld is actually being started at boot? (chkconfig, also ps aux | grep mysqld) the mysql.sock file is supposed to be created each time the mysqld server starts. So next step, check logs to ensure it's starting without errors. – Ryan Griggs – 2014-06-22T01:36:36.827
Is it illegal to ask dumb quesition? :) Hey, Ryan, think twice, maybe your answer is more dumber than my quesition? I will find out by myself thank you :) – CEO at Apartico – 2014-06-23T14:03:47.843
You misunderstood. I was saying my question was dumb. Not yours. Good luck. – Ryan Griggs – 2014-06-23T18:15:11.043