本文主要是介绍使用Mac报Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’
原因:无法在设置中开启mysql
在终端输入sudo /usr/local/mysql/support-files/mysql.server start,输入密码可以重新开启Mysql
sudo ln -s /Applications/MAMP/Library/bin/mysql /usr/bin
ljdeMacBookPro16:~ lij$ sudo /usr/local/mysql/support-files/mysql.server start
Password:
Sorry, try again.
Password:输入密码
Starting MySQL
.Logging to ‘/usr/local/mysql/data/ljdeMacBookPro16.err’.
. SUCCESS!
这篇关于使用Mac报Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!