我在 Debian 6 上安装了 mysql-server-5.1 包。将绑定地址更改为 10.100.1.10(供内部使用),当我重新启动服务器时,它不会启动 mysql。系统日志显示的内容如下:
Jul 24 18:04:39 server0 mysqld:
Jul 24 18:04:39 server0 mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
Jul 24 18:04:46 server0 kernel: [ 13.786387] eth0: no IPv6 routers present
Jul 24 18:04:48 server0 /etc/init.d/mysql[1419]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Jul 24 18:04:48 server0 /etc/init.d/mysql[1419]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
Jul 24 18:04:48 server0 /etc/init.d/mysql[1419]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Jul 24 18:04:48 server0 /etc/init.d/mysql[1419]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Jul 24 18:04:48 server0 /etc/init.d/mysql[1419]:
答案1
/usr/bin/mysqladmin:连接到“localhost”的服务器失败
看起来你没有localhost
在更改时将其包含在列表中bind-address
,但你也没有更改/etc/init.d/mysql
尝试连接到的地址是绑定。您需要选择其中之一 - 第一个可能是更好的选择。