mysql create user mysql.plugin table.  Please run mysql_upgrade to create it

jackxiang 2011-1-2 00:52 | |

101007 22:30:31 [ERROR] Can't open the mysql.plugin table. Please run the mysql_upgrade script to create it.
101007 22:30:31 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
101007 22:30:31  mysqld ended

再源码下面执行,如下:
linux-Jack-nb4:~/webserver/mysql-5.1.12-beta # ./scripts/mysql_install_db --user=mysql --datadir=/usr/local/mysql/var
Installing all prepared tables
Fill help tables

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h linux-Jack-nb4 password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/local/mysql/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &

Please report any problems with the /usr/local/mysql/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com



Mysql运行Ok了:
linux-Jack-nb4:~/webserver/mysql-5.1.12-beta # ps aux|grep mysql
root      5515  0.0  0.1   2804  1312 pts/0    S    22:40   0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe
mysql     5566  0.3  1.6  81984 13132 pts/0    Sl   22:40   0:01 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --user=mysql --pid-file=/usr/local/mysql/var/linux-Jack-nb4.pid --log-error=/usr/local/mysql/var/linux-Jack-nb4.err --socket=/tmp/mysql.sock --port=3306
前面指定了DB位置,后面就会对于那个--datadir=位置所在:
/usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/data/mysql-/ --user=mysql --pid-file=/data/mysql-//linux-jack-xiang.pid --log-error=/data/mysql-//linux-jack-xiang.err --socket=/tmp/mysql.sock --port=3306
root      5606  0.0  0.0   1900   652 pts/0    S+   22:47   0:00 grep mysql



在MYSQL启动老失败即:Starting MySQL.Manager of pid-file quit without updating file.[FAILED]
查看错误日志显示:mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
/usr/local/mysql/bin/mysqld: Table 'mysql.plugin' doesn't exist

Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
InnoDB: The first specified data file ./ibdata1 did not exist:

作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/3920/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!

评论列表
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]