MySQL Forums
Forum List  »  Install & Repo

Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (61)
Posted by: Mezbaur Rahman
Date: December 14, 2006 10:48AM

Follow this process, it worked for me.

Set the root user's password for mySQL

Which is different from the root (*nix) user:
/usr/bin/mysqladmin -u root password new-password

If you get "Access denied" for root@localhost try this method:
Stop mysqld:
service mysqld stop
Start it with:
/usr/libexec/mysqld --skip-grant-tables --user=mysql
Log onto another terminal or SSH session (you're not using telnet I hope) and run:
mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('mynewpassword')
-> WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit

Then test with:
mysql -u root -p

Options: ReplyQuote


Subject
Written By
Posted
Re: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (61)
December 14, 2006 10:48AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.