升级Ubuntu到10.04之后,连接mysql提示:
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
看了一下,mysql没有启动。执行
sudo start mysql
无法启动,没有任何响应。
start mysql
无法启动,得到提示:
-
start: Rejected send message, 1 matched rules; type="method_call", sender=":1.80" (uid=1000 pid=14704 comm="restart) interface="com.Ubuntu.Upstart0_6.Job" member="Restart" error name="(unset)" requested_reply=0 destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init"))
直接启动:
sudo -u mysql mysqld
得到提示:
mysqld: Table 'mysql.plugin' doesn't exist
100508 9:08:53 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
100508 9:08:54 InnoDB: Started; log sequence number 0 14859112
100508 9:08:54 [ERROR] mysqld: unknown option '--skip-bdb'
100508 9:08:54 [ERROR] Aborting
编辑/etc/mysql/my.cnf,找到–skip-bdb一行,注释掉。再执行sudo -u mysql mysqld或sudo start mysql,均可顺利启动。
再依照提示upgrade一下:
mysql_upgrade -p
本文出自:亿恩科技【www.enkj.com】