Error “Error while starting mysql: Fatal error: Can't open and lock privilege tables: Table '.\mysql\user' is marked as crashed and should be repaired

kumkumsharma

Administrator
Staff member
If you are getting below error while establishing connection with “Collection Max” then you can check below steps to resolve issue.

Code:
Error while starting mysql: Fatal error: Can't open and lock privilege tables: Table '.\mysql\user' is marked as crashed and should be repaired. MySQL server would no longer start, instead giving a Fatal error: Can't open and lock privilege tables: Can't find file: 'filename'
It looks like MySQL service is not restarting properly and because of that we are facing this error. We have to follow below steps to resolve this issue.
  • Login to RDP and click on command prompt.
  • Make sure you have administrator privileges to accessing command prompt.
  • Frist start MySQL server in safe mode with below command.
Code:
mysqld_safe --skip-grant-tables &
  • Now select particular database:
Code:
use database_name;
  • And repair your selected database with below command:
Code:
Repair table table_name;
  • At last, using below command you can restart MySQL service.
Code:
/etc/init.d/mysqld stop
/etc/init.d/mysqld start
SSD Windows
 
Top