I was working on a mysql server one day and mysql was refusing to start. There were no errors in logs, hence I started mysql with mysqld_safe which displayed the error as follows.
[ERROR] Fatal error: Can’t open and lock privilege tables: Table ‘mysql.host’ doesn’t exist
Upon checking the data dir at /var/lib/mysql, I noticed that the folder for mysql database is missing. Hence I issued the following command and it installed the db just fine. After that I was able to restart mysql without issues.
mysql_install_db
Recent Comments