Cara menangani ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

jika anda mengalami kesalahan seperti ini :

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

kesalahan ini pada mysql di linux Mint

langkah untuk memperbaikinya :
buka terminal lalu ikuti langkah sebagai berikut 

alif-K43U alif # mkdir /var/run/mysqld

alif-K43U alif # ln -s /opt/lampp/var/mysql/mysql.sock /var/run/mysqld/mysqld.sock

alif-K43U alif # mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.6.16 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

oke selesai ,, semoga bermanfaat

0 komentar: (+add yours?)

Posting Komentar

KOMENTAR AKAN DI BALAS JIKA PENULIS SEMPAT MEMBALAS