13

每次我重新启动 MySQL 服务器

bitnami@xxx:/$ sudo opt/bitnami/ctlscript.sh start server

 

WWarning: World-writable config file '/opt/bitnami/mysql/my.cnf' is ignored
Warning: World-writable config file '/opt/bitnami/mysql/my.cnf' is ignored
121120 12:30:18 mysqld_safe Logging to '/opt/bitnami/mysql/data/mysqld.log'.
121120 12:30:18 mysqld_safe Starting mysqld daemon with databases from /opt/bitnami/mysql/data
121120 12:30:20 mysqld_safe mysqld from pid file /opt/bitnami/mysql/data/ip-10-136-14-170.pid ended
/opt/bitnami/mysql/scripts/ctl.sh : mysql  could not be started

服务器响应以下错误:

(2002,“无法通过套接字'/tmp/mysql.sock'(2)连接到本地MySQL服务器”)

请告诉我我必须做些什么来解决这个问题。

4

1 回答 1

34

如果 mysql 作为服务安装(大多数情况下),您可以执行service mysqld restart/etc/init.d/mysqld restart.

您也可以使用start,stopreload代替restart.

于 2012-11-20T12:55:34.237 回答