搞了一天了。。午饭都没吃。。
网上搜的都解决不了啊。。
问题如下。。
用mysqld_safe启动服务器发现失败。。
代码:
root@ubuntu:/usr/local/mysql/bin# ./mysqld_safe
111005 15:38:53 mysqld_safe Logging to '/usr/local/mysql/var/ubuntu.err'.
111005 15:38:54 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
111005 15:38:54 mysqld_safe mysqld from pid file /usr/local/mysql/var/ubuntu.pid ended
打开.err日志文件
发现错误如下。。
代码:
111005 15:15:16 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
111005 15:15:16 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
/usr/local/mysql/libexec/mysqld: Table 'mysql.plugin' doesn't exist
111005 15:15:16 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
111005 15:15:16 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
111005 15:15:16 mysqld_safe mysqld from pid file /usr/local/mysql/var/ubuntu.pid ended
我上网查了下
http://jeck2046.blog.51cto.com/184478/158705/
里面说
解决办法 在运行初始化权限表的时候使用增加参数--datadir ,命令格式为:
shell> scripts/mysql_install_db --user=mysql --datadir=/usr/local/mysql/var
我改了以后没用啊。。
代码:
root@ubuntu:/usr/local/mysql/bin# shell> ./mysql_install_db --user=mysql --datadir = /usr/local/mysql/var
还有mysql和var文件夹的权限我都设置了啊。。
代码:
root@ubuntu:/usr/local/mysql# ls -dl var
drwxrwx--x 2 mysql mysql 4096 2011-10-05 15:39 var
求救求救。。