[Ilugc] Re: Can't connect to local MySQL server

  • From: aishu.moorthy@xxxxxxxxx (aishwarya .)
  • Date: Tue Sep 1 10:08:25 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)

*This problem occurs when there's only the MYSQL client installed!
So install the MYSQL server using the command
" sudo apt-get install mysql-server-5.1"
Try this, the problem will be resolved.*

-- 
Thanks,
Aishwarya.M.B

Other related posts: