MySQL-Mac-错误2002-无法通过套接字连接到本地... [英] MySQL - Mac - Error 2002 - Can't connect to local... through socket

查看:159
本文介绍了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:

  1. 转到系统偏好设置"
  2. 然后,如果安装了MySQL,则应该在底部的其他"部分中看到"MySQL"图标.点击它.
  3. 单击启动MySQL服务器"
  1. Go to "System Preferences"
  2. Then, if MySQL is installed you should see a "MySQL" icon in the "Other" section right at the bottom. Click on it.
  3. Click on "Start MySQL Server"

现在您将能够启动MySQL命令提示符而不会出现无法连接..."错误.

You will now be able to start the MySQL command prompt without getting the "Can't connect..." error.

这篇关于MySQL-Mac-错误2002-无法通过套接字连接到本地...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆