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)
4.运行/usr/local/mysql/bin/mysql。
复制代码 代码如下:
#注 如果出现Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)错误:
cd /usr/local/mysql/bin/mysql
修改该文件夹下my.cnf文件 添加socket = /tmp/mysql.sock