You are here:

MySQL/Retieving the Data from MySQL Server to Window Application Form

Advertisement


Question
I have to create window application in c#.net & MySql server

Mysql server is on remote host, Now I have to retrieve the data forn remote mysql server.
while connecting to localhost in this line server = "localhost" the dabase is connected but when connect remote mysql host by writing the IP like  server = "173.192.76.44"; its show the error :
Unable to connect to any of the specified MySQL hosts.

Answer
Hi Ranjana,
1. Make sure that you can ping the DB Server IP
2. Telnet to the DB Server IP on port 3306
3. If both the above work, then run the following on the DB server
select user,host from mysql.user where user = 'username';
where username is the login id which you are using to connect to the server.
You should see something like :
User        Host
username    localhost
username     %

If you do not see the record with %, then use the grant command to add the same user with % option.

This should resolve your issue.

Cheers,
Claude

MySQL

All Answers


Answers by Expert:


Ask Experts

Volunteer


Claude Veigas

Expertise

Any questions related to MySQL installation, administration and query optimization.

Experience

6 years experience in Mysql.

Publications
Mysql forums

Education/Credentials
BSc - Physics - Electronics

Awards and Honors
NEXT CIO award 2010

©2016 About.com. All rights reserved.