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






Thanks for spreading your knowledge.
It is very helpful for me.
Thanks ones again.
Hi Mamun,
Glad that you found the post useful….
You save my whole college life!
thank you!
Hi Ejan,
Glad that the post was of some help to you ..
I’m appreciating this post, it really was the unique effective solution to get remote connection with Mysql Workbench in Xampp for Windows, so easy and so complicated, lol. Thanks
Hi Renato,
Glad that the post was useful to you ..
Dear Thanks you very much…
This is very Helpful. You save my appx 1month of time.
Anybody Can Use this….
You are welcome
Its working .. thanks.
i have problem when i join the site i write my site http://nighthotel.web44.net/
then i get Warning: mysql_connect() [function.mysql-connect]: Host ‘Siteip’ is not allowed to connect to this MySQL server in /home/a2524662/public_html/global.php on line 27
Free Web Hosting
Could not connect to server, error: Host ‘Siteip’ is not allowed to connect to this MySQL server
I would need access to your site to actually resolve the problem