MySQL-Mac-错误2002-无法通过套接字连接到本地...
直到今天早些时候,当我安装自制软件并更新Path时,我的MySQL仍能在Mac上正常运行.
I had MySQL running fine on my Mac till earlier today when I installed homebrew and also updated my Path.
当我现在尝试从三元窗口运行mysql时,出现以下错误:
When I try to run mysql from my ternimal window now, I get the following error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
我也无法连接MySQLAdmin.
I can't connect MySQLAdmin either.
我什至不能运行Mysqld.尝试运行mysqld时出现的错误是无法创建测试文件.
I can't even run Mysqld. The error I get when trying to run mysqld is that it can't create test file.
我还尝试通过telnet本地主机3306,但无法连接.
I also tried to telnet localhost 3306 and wasn't able to connect.
由于我是Mac的新手,任何帮助将不胜感激.
Any help would be appreciated as I am fairly new to Mac.
基本上,您要做的就是:
Basically, all you have to do is:
- 转到系统偏好设置"
- 然后,如果安装了MySQL,则应该在底部的其他"部分中看到"MySQL"图标.点击它.
- 单击启动MySQL服务器"
- Go to "System Preferences"
- Then, if MySQL is installed you should see a "MySQL" icon in the "Other" section right at the bottom. Click on it.
- Click on "Start MySQL Server"
现在您将能够启动MySQL命令提示符而不会出现无法连接..."错误.
You will now be able to start the MySQL command prompt without getting the "Can't connect..." error.