Link to home
Start Free TrialLog in
Avatar of bethzycb
bethzycb

asked on

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) Problem

Hi!
I'm really desperated with this problem, please someone help me, is very URGENT!!!


I have mysql installed over linux box. I  have phpmyadmin 2.6 installed on it.  I changed the pwd of root user, but I didn't know that account was related to a VERY IMPORTANT application. I tried to change the pwd in the application, but it told me: Access denied for user 'root'@'localhost' (using password: YES)  .

Then I tried changing the pwd back, shutting down the mysqld service and restarting it with --skip-grant-tables and after that I created a file with the following text:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypwd'). I named the file mysql-init and then run:
mysqld_safe --init-file=~/mysql-init &

It seemed to work fine, it displayed:
[root@declaranet bin]#  mysqld_safe --init-file=~/mysql-init &
[1] 30618
[root@declaranet bin]# Starting mysqld daemon with databases from /var/lib/mysqlSTOPPING server from pid file /var/run/mysqld/mysqld.pid
060428 15:05:46  mysqld ended

but it doesn't return to the prompt, it keeps there after more than 30 minutes.

Then in another terminal I try  mysql -u root but it sends me the error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

I really don't know what to do... It's VERY IMPORTANT and needs to be solved today.

Please, can someone help me???


Any help will be appreciated.
SOLUTION
Avatar of Yuval_Shohat
Yuval_Shohat
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bethzycb
bethzycb

ASKER

Thanks patspam...

You were right, the problem was with mysql not running, it seemed we had a problem with the daemon or something like that, furthermore, the password provided was wrong, that's one of the biggest problems, but we could make things work...

Thanks both of u, the links Yuval_Shohat  provided gave us some light...

Glad you got it working :)

Regards,

Patrick