You are here:

MySQL/connecting mysql database to .net desktop application


Dear Sir,

I want to connect mysql database to my .net desktop application. I have given connection string as "SERVER=;DATABASE=kushayus_testdb; UID=kushayus_testuid;PWD=J7WN9W[~Nf~o"
previously it was working smoothly but now error is coming "Unable to connect to any of the specified MySQL hosts."

I searched alot and got the solution on " which says "When the database is originally set up it defaulted to not allow remote connections, but within the phpAdmin it doesn't list this as an option to edit. The only solution was to create a new database and adjust this setting at creation time"

But what all setting they want to say not able to understand.
Please tell me how to create a database in my cpanel which allow remote connection.

Please edit question and remove all connection information. Your server may be hacked.

Login to mysql and run the following command :
select user,host from mysql.user where user = 'kushayus_testuid';

Your output should be 2 rows atleast:
kushayus_testuid, localhost
kushayus_testuid, %

If not, then you will need to either add the IP or % to this table by using the grant command.

Claude Veigas

update : I tried connecting to the server with the credentials provided and could not do so. Probably the IP is an internal one. So there's no need to worry about someone connecting to the server. Nevertheless, please change the password for all logins that can are visible online.


All Answers

Answers by Expert:

Ask Experts


Claude Veigas


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


6 years experience in Mysql.

Mysql forums

BSc - Physics - Electronics

Awards and Honors
NEXT CIO award 2010

©2016 All rights reserved.