Wednesday, July 4, 2012

Fixing Can't open and lock privilege tables: Table 'mysql.host' doesn't exist with Windows MySQL noinstall

Time to address the "Code" part of "Code, Cooking, and Cats"...

While getting started with MySQL on Win 7, I ran into the following error when running the command:  mysqld.exe --console 

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

I had used the noinstall Zip Archive to install, carefully following the instructions from the Reference Manual. I wasn't able to find any helpful information online to solve the problem so in case you run into this too...

First check the data dir. If files are created there, you know it's not a problem with configuration. It's likely to be a permissions problem. The best way to solve this is to start over with your MySQL installation.


Right-click on the My SQL zip file and select Properties. In the General tab, click Unblock. Then unzip and continue from there.