Can’t open and lock privilege tables: Table ‘mysql.host’ doesn’t exist
2011年02月26日 星期六 01:43
关于手动修改mysql目录下的my.ini的数据库保存路径后,在启动的时候出错。
查看错误日志后,发现Can’t open and lock privilege tables: Table ‘mysql.host’ doesn’t exist
原错误日志内容:
110226 1:20:46 [Note] Plugin ‘FEDERATED’ is disabled.
C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld: Table ‘mysql.plugin’ doesn’t exist
110226 1:20:46 [ERROR] Can’t open the mysql.plugin table. Please run mysql_upgrade to create it.
InnoDB: The first specified data file D:\mysite\database\ibdata1 did not exist:
InnoDB: a new database to be created!
110226 1:20:47 InnoDB: Setting file D:\mysite\database\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait…
110226 1:20:47 InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 10 MB
InnoDB: Database physically writes the file full: wait…
110226 1:20:47 InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 10 MB
InnoDB: Database physically writes the file full: wait…
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
110226 1:20:48 InnoDB: Started; log sequence number 0 0
110226 1:20:48 [ERROR] Fatal error: Can’t open and lock privilege tables: Table ‘mysql.host’ doesn’t exist
从网上查了半天都是linux下的解决方法,没有windows的。不过仔细看了看linux下的解决方法,发现是因为
这个文件闹得,从日志上来看是因为不能够打开私有权限的表格。
这个文件闹得,从日志上来看是因为不能够打开私有权限的表格。
解决方法直接把这个文件夹全都复制到你要修改的目录下,重启mysql就ok了。