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

Print Friendly, PDF & Email

If you get the error described in the heading, you can overcome this problem by doing the following

Be sure to change the path’s to reflect your own setup

rm -rf /pathtodatadir
cd /usr/local/mysql1/bin
./mysql_install_db --user=mysql --ldata=/sqldata
./mysqld_safe --datadir=/sqldata --user=mysql &;

I go this solution from this page.


Share and Enjoy !

0 0

Add a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.


  1. Andrew

    Thank you this workd, but the last command should be :

    ./mysqld_safe –datadir=/sqldata –user=mysql &

  2. Ah, my mistake! That’s what happens when you copy/paste…

    Thanks for the heads-up, will fix right now!