Linux

error 2002 (hy000) can't connect to local mysql server through socket '/tmp/mysql.sock' (111)

Naan 2015. 3. 12. 14:04
반응형

# mysql -u root 

error 2002 (hy000) can't connect to local mysql server through socket '/tmp/mysql.sock' (111)

접속 하려고 했더니 위와 같이 에러가 발생이 된다.


# rm -rf /var/lib/mysql/mysql.sock

# service mysqld restart

Stopping mysqld:                                           [  OK  ]

Starting mysqld:                                           [  OK  ]

# mysql -u root

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 4

Server version: 5.1.71-log 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>


정상 접속이 된다.


반응형