[Ilugc] Can't connect to local MySQL server

  • From: sagarun@xxxxxxxxx (Arun SAG)
  • Date: Sat Aug 8 07:20:20 2009

Hi,
On Sat, Aug 8, 2009 at 6:39 AM, Dhilip S <dhilip.jec@xxxxxxxxx> wrote:

i'm having the problem in Mysql. i frequently getting this Mysql sockect
error.
$ mysql -u root
$ *Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
HOW to over come this error?


First start the mysql server, su -c 'service mysqld start'  and then
connect. Use 'mysql -u root -p' command instead of mysql -u root.
Here is my attempt to connect to a mysql server  which is not yet started !
bash-4.0$ mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)


Regards
Arun SAG

-- 
A computer is like air conditioning: it becomes useless when you open
windows.
<-Fighting 4 Freedom->

Other related posts: