Error: Host ‘localhost’ is not allowed to connect to this MySQL server
Posted in Hosting & IIS7, Windows Server | No Comment | 4,842 views | 25/10/2011 12:53
You may get this error when you try to access MySQL server on Windows.
Host ‘localhost’ is not allowed to connect to this MySQL server.
Host ‘127.0.0.1’ is not allowed to connect to this MySQL server.
1. Stop MySQL service (from services.msc)
2. Create a text file in C:\ called “init.txt”. Paste the following code and save it.
3. Open command prompt (cmd)
4. Go to MySQL bin directory on cmd.
5. Start MySQL service on cmd.
6. Close cmd and kill “mysqld.exe” from task manager.
7. Start MySQL service.
Now you should be able to connect MySQL via root user.
Leave a Reply