您好,欢迎访问一九零五行业门户网

mac安装mysql后,启动mysql ERROR 2002(HY000)错误解决办法_MySQL

bitscn.com
mac安装mysql后,启动mysql error 2002(hy000)错误解决办法
安装mac版的mysql后,启动mysql 报错:
error 2002 (hy000): can’t connect to local mysql server through socket ‘/var/lib/mysql/mysql.sock’ (2)
google了一下发现很多人遇到,解决方法都各不相同,于是去查了下安装包中的readme,里面说的很清楚了:
after the installation, you can start up mysql by running the following
commands in a terminal window. you must have administrator privileges
to perform this task.
if you have installed the startup item, use this command:
shell> sudo /library/startupitems/mysqlcom/mysqlcom start
     (enter your password, if necessary)
     (press control-d or enter exit to exit the shell)
if you don't use the startup item, enter the following command sequence:
shell> cd /usr/local/mysql
     shell> sudo ./bin/mysqld_safe
     (enter your password, if necessary)
     (press control-z)
     shell> bg
     (press control-d or enter exit to exit the shell)
you should be able to connect to the mysql server, for example, by
running `/usr/local/mysql/bin/mysql'.
完成上面的命令后,启动mysql成功
bitscn.com
其它类似信息

推荐信息