17 February 2013

Can't connect to local MySQL





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




solusi

sudo service mysql stop

sudo /etc/init.d/apparmor reload

sudo service mysql start 


kalo masih ndak bisa edit file /etc/init/mysql.conf


gedit  /etc/init/mysql.conf

kasih spasi pada runlevel[2345])

hasil akhir

start on (net-device-up
          and local-filesystems
         and runlevel [2345])
stop on runlevel [016]

No comments:

Post a Comment