STOPPING server from pid file /var/run/mysqld/mysqld.pid

[root@localhost]# /usr/bin/mysqld_safe &

[1] 25653

[root@localhost]# Starting mysqld daemon with databases from /var/lib/mysql

STOPPING server from pid file /var/run/mysqld/mysqld.pid

100126 03:43:33  mysqld ended

 

[1]+  Done                    /usr/bin/mysqld_safe


 


 

[root@localhost]# more /var/log/mysqld.log

100126 03:43:33  mysqld started

100126  3:43:33  InnoDB: Database was not shut down normally!

InnoDB: Starting crash recovery.

InnoDB: Reading tablespace information from the .ibd files...

InnoDB: Restoring possible half-written data pages from the doublewrite

InnoDB: buffer...

100126  3:43:33  InnoDB: Starting log scan based on checkpoint at

InnoDB: log sequence number 0 43634.

InnoDB: Doing recovery: scanned up to log sequence number 0 43634

100126  3:43:33  InnoDB: Flushing modified pages from the buffer pool...

100126  3:43:33  InnoDB: Started; log sequence number 0 43634

100126  3:43:33 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

100126 03:43:33  mysqld ended


 

执行以下命令即可:

[root@localhost]# mysql_install_db

一个mysql授权问题,小结下!
service mysqld start 报错
090517 13:34:15 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
090517 13:34:15 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
090517 13:34:15 mysqld_safe mysqld from pid file /usr/local/mysql/var/mail.bmitwap.com.pid ended
090517 13:38:35 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
解决办法 在运行初始化权限表的时候使用增加参数--datadir ,命令格式为:

shell> scripts/mysql_install_db --user=mysql --datadir=/usr/local/mysql/var
这样问题就解决了。

你可能感兴趣的:(数据库,mysql,error,职场,休闲)