121031 14:14:11 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
121031 14:14:12 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
121031 14:14:12 InnoDB: Initializing buffer pool, size = 8.0M
121031 14:14:12 InnoDB: Completed initialization of buffer pool
121031 14:14:12 InnoDB: Started; log sequence number 0 43655
121031 14:14:12 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
121031 14:14:12 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50095, now running 50158. Please use mysql_upgrade to fix this error.
121031 14:14:12 [ERROR] mysql.user has no `Event_priv` column at position 29
121031 14:14:12 [ERROR] Cannot open mysql.event
121031 14:14:12 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
121031 14:14:12 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.58' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Utter Ramblings我是个mysql新手,在网上找了很久
解决方法是:在运行初始化权限表的时候使用增加参数--datadir ,命令格式为: shell> ..../mysql_install_db --user=mysql --datadir=/usr/local/mysql/var
但是我运行时出错了。请大家帮帮小弟,谢谢啦
不是的,在/var/lib/mysql/这个里面,但是在这个里面还有个mysql文件。
我该怎么运行命令呀?
命令格式: shell> ..../mysql_install_db --user=mysql --datadir=/var/lib/mysql这样吗?
total 20532
-rw-rw---- 1 mysql mysql 10485760 Oct 31 14:24 ibdata1
-rw-rw---- 1 mysql mysql 5242880 Oct 31 21:16 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Oct 11 14:31 ib_logfile1
drwx------ 2 mysql mysql 4096 Oct 25 03:05 isoloone_ims
drwx------ 2 mysql mysql 4096 Oct 11 14:31 mysql
srwxrwxrwx 1 mysql mysql 0 Oct 31 21:16 mysql.sock
drwx------ 2 mysql mysql 4096 Oct 11 14:31 test有这些文件~~
看明白了,这些目录是数据库。
我那个问题改怎么解决呀?
mysql_upgrade --datadir=/var/lib/mysql -uroot -hlocalhost -p