Home > MySQL > MySQL – Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’

MySQL – Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’

Problem:
I upgraded mysql server from 5.1 to 5.1.6 and when I try to log in I get the following error.

user@computer:~$ mysql -u root -p
Enter password: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Solution:
After a quick search on google this is what helped me.
1. Completely remove mysqlserver-5.1.6
2. I renamed the existing /etc/mysql/my.cnf to /etc/mysql/my.cnf.doesnotwork.
3. Install mysqlserver-5.1.6 again.

Source:
http://forums.debian.net/viewtopic.php?f=17&t=59674

Advertisements
Categories: MySQL
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: