mac下mysql无法启动mysql
解决方法1:
输入MySql启动命令:
sudo /usr/local/mysql/support-files/mysql.server start
报错信息如下:
Starting MySQL.Logging to '/usr/local/mysql/data/mac.local.err'.
ERROR! The server quit without updating PID file (/usr/local/mysql/data/mac.local.pid).
后面找到原因发现目录/usr/local/mysql/data/的mysql拥有者权限发生了变更,没有写的权限,所以需要对该目录赋予写的权限,操作命令如下:
sudo chown -R mysql /usr/local/mysql/data
然后再次输入启动命令:
sudo /usr/local/mysql/support-files/mysql.server startStarting MySQL
.Logging to '/usr/local/mysql/data/oxy-mac.local.err'.
. SUCCESS!
解决方法2:
出现问题如图所示:
点击 Start MySQL Server 没反应……
终端输入 mysql 命令时报错如下:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
解决方法:
打开 Activity Monitor, 找到 mysqld 进程,如图:
杀掉该进程!
PS: 点击 Quit 后貌似也没效果……但此时再回到 MySQL 端,已经启动了
以上是 mac下mysql无法启动mysql 的全部内容, 来源链接: utcz.com/z/539419.html