查看windows日志提示mysql db表损坏,需要修复
MySQL: Table '.\mysql\db' is marked as crashed and should be repaired
For more information, see Help and Support Center at http://www.mysql.com.
Fatal error: Can't open and lock privilege tables: Table '.\mysql\db' is marked as crashed and should be repaired
For more information, see Help and Support Center at http://www.mysql.com.
进入mysql bin目录下,执行
myisamchk --recover --quick ../data/mysql/db.myi
- check record delete-chain
myisamchk: error: Record at pos: 30360 is not remove-marked
myisamchk: error: record delete-link-chain corrupted
myisamchk: error: Quick-recover aborted; Run recovery without switch 'q'
MyISAM-table '../data/mysql/db.myi' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag
提示快速修复不行,那我们根据提示再次执行
myisamchk --safe-recover ../data/mysql/db.myi
- recovering (with keycache) MyISAM-table '../data/mysql/db.myi'
Data records: 874
Data records: 875
提示成功,再次启动MySQL服务,成功启动,解决