Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to connect to MySQL Server hosted on a Linux Machine from my Windows Machine using Command Prompt with the following command:

prompt>mysql -u root -p -h remote_hostname

Connections, ports, user accounts and credentials are all fine. But it is throwing the below error:

ERROR 1130 (HY000): Host 'my_hostname' is not allowed to connect to this MySQL server

I am wondering is it possible to communicate with Linux Shell from Windows Command Prompt? or is it not at all in the very design of prompt to connect to Linux Shell for any remote operations? Or is it special in case of MySQL.

I observed that I can connect from Linux to Windows but the reverse is not possible when I am trying just like I explained above.

Anybody know the theoretical explanation to this?

share|improve this question

You state that "Connections, ports, user accounts and credentials are all fine.", but I have my doubts.

Mentioning the exact error from the documentation:

[The error] occurs when you try to connect from a host other than the one on which the MySQL server is running, it means that there is no row in the user table with a Host value that matches the client host

Look in your mysql.user table on the Linux MySQL server for a user entry with the user/host combination of your windows machine:

SELECT User, Host FROM mysql.user WHERE User='my_user' AND Host='windows_ip';

If that doesn't return a result, you'll need to add that user. If it does return a result, can you add that to your question?

share|improve this answer
Hi DTest, Thanks for the reply! If i create a user for example 'user'@'%' then it should be able to connect to the host MySQL server from any remote machine. I am using the account similar to what i mentioned now with '%' wildcard as the host value. – V R Murthy Korimilli Oct 9 '12 at 14:17
What value are you using as the remote_hostname in -h remote_hostname? is it a machine name, or the IP? Highly recommend using IP.. – Derek Downey Oct 9 '12 at 15:11
Yes i have tried using the IP address only. But the same result! :( – V R Murthy Korimilli Oct 9 '12 at 15:23
Have you connected to Linux Machine from Windows Prompt anytime? Is it possible actually? – V R Murthy Korimilli Oct 9 '12 at 15:24
Not personally, but I have to think it's definitely possible and this is just a configuration issue. What is the value of your 'bind-address' option on the linux machine ? – Derek Downey Oct 9 '12 at 15:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.