Host ‘HostName’ is not allowed to connect to this MySQL server
I do most of my development work using XAMPP. So I always have a MySQL server up and running.
Recently there was a requirement to develop a Windows Desktop Application in C# with the backend as MySQL. I was developing this on a networked Windows machine and had configured the connection string accordingly.
When i first ran the application BAM!!! i got this error
A little investigation and the solution is what i found below.
Just follow the below steps and the error should be gone ..
Access the MySQL database using phpMyAdmin
Click on Privileges and you should get the following screen
Click on the link Add a new User and you would be greeted with the following screen
Fill up the relevant details as per shown in the picture and click Go at the bottom right of the page to complete the step.
Once done you would be greeted with a page similar to this
Next time when i executed the application there was no problem and I sailed along smoothly.
Hope if you fall into the same trap this would help you move out of it