I have a Centos 5.5 Server and needs to migrate to a new one with 6.6. I have about three websites, a third party application(service). I need to put all these to my new server and host the websites. And In the new machine i am not able to connect to mysql, when i try to connect using mysql -u root the below error is shown.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Please suggest how can i connect with mysql and the migration? I am new to this.
I have tried to change the password using skip grantables and again the result is same.