Can't connect to local MySQL server through socket '/tmp/mysql.sock'

Posted Hale.Proh

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Can't connect to local MySQL server through socket '/tmp/mysql.sock'相关的知识,希望对你有一定的参考价值。

macdembp:~ mac$ netstat -xl | grep mysql

e7861942257b0691 stream      0      0 e78619422ab30a91                0                0                0 /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock

macdembp:~ mac$ mysql -uroot -p -S /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock

Enter password: 

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

Your MySQL connection id is 1

Server version: 5.6.16 Source distribution

 

Copyright (c) 2000, 2016, 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>

以上是关于Can't connect to local MySQL server through socket '/tmp/mysql.sock'的主要内容,如果未能解决你的问题,请参考以下文章

MySQL Can't connect to MySQL server on 'localhost' (10061)

Jenkins: Can't connect to Docker daemon解决办法

MySQL错误2003:Can't connect to MySQL server (10060)

Can't connect to MySQL server on 'localhost'(10061)解决方法

MySQL:Can't connect to mysql server 10038

解决Can't connect to MySQL server on 'localhost' (10048)