My Computer / My Documents · 2012/10/18 0

解决方案 - Starting MySQL.Manager of pid-file quit without updating file.

给服务器装了个组件,结果
Starting MySQL.Manager of pid-file quit without updating file.

Google了一下,说法大概有以下几种:
  • 各种权限问题
  • /etc/my.cnf 把 skip federated注释掉
  • /etc/my.cnf设置数据库路径 datadir = /xxx
  • 如果删除了日志文件,也要将mysql-bin.index删除
  • 禁用日志 #log-bin=mysql-bin
    #binlog_format=mixed

其实这些方法都对,关键是要对症下药,最后才想起看错误日志(主机名.err):
121018 22:56:14 mysqld_safe mysqld from pid file /usr/local/mysql/var/localhost.pid ended
121018 23:03:12 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
121018 23:03:12 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
121018 23:03:12 [ERROR] Do you already have another mysqld server running on port: 3306 ?
121018 23:03:12 [ERROR] Aborting

mysql的默认端口3306被占用了?汗。。。于是

ps -A|grep mysql
root@localhost:/usr/local/mysql/var# ps -A|grep mysql
1606 ?        00:00:00 mysqld_safe
1749 ?        1-23:38:50 mysqld

将两个进程杀掉
kill -9 1749
kill -9 1606

重启服务后系统恢复正常。
太依赖搜索引擎了,往往忘记去看错误日志,反而走了弯路。