[SOLVED] Fatal error: Can’t open and lock privilege tables: Table ‘mysql.host’ doesn’t exist

Dear All,

 

Today morning I got call from development team about MySQL as the MySQL service is not getting started so checked error.log file and the error was as below 

 

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

 

Error itself indicates some issue with MySQL database (system database) has issue so applied below command and issue resolved

 

# mysql_install_db --user=mysql --basedir=/usr/ --ldata=/var/lib/mysql/
					

 

Pre-caution:- it will reset all user accounts (will delete all users from MySQL) only root user will be there with blank password.

 

The problem was interesting and the solution was more interesting so I feel to document it.

 

Thanks,

 

 Prashant Deshpande

Advertisements

1 Comment

Filed under Uncategorized

One response to “[SOLVED] Fatal error: Can’t open and lock privilege tables: Table ‘mysql.host’ doesn’t exist

  1. Amreen

    Hi,

    I have the same issue . I tried all possible way to run mysql but no use 😦 Can you tell me how to do it in windows 7. I am using wamp server.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s