[英]Mac Terminal/ MySQL configuration issues | ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I've been getting this error when trying to navigate to MySQL in the command prompt. 尝试在命令提示符下导航到MySQL时,我一直收到此错误。 System Preferences shows it's running through port 3306. I'm new to programming and I'm just trying to keep up with tutorials, but a lot of this knowledge is stacked and without a properly working local database things just continue to get more and more confusing.
系统偏好设置显示它正在通过端口3306运行。我是编程新手,我只是想跟上教程的步伐,但是很多知识是堆积在一起的,并且如果本地数据库无法正常工作,事情会继续变得越来越多。令人困惑。
Also have been receiving this error: 也一直收到此错误:
ERROR 1045 (28000): Access denied for user 'hostname'@'localhost' (using password: NO)
错误1045(28000):用户'主机名'@'本地主机'的访问被拒绝(使用密码:否)
It seems like Mysql server has not started. 看来Mysql服务器尚未启动。
mysqld stop
mysql.server start
This will fix the issue. 这样可以解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.