c# - Connecting with remote mysql database, getting the error "Unable to connect to any of the specified MySQL hosts" -



c# - Connecting with remote mysql database, getting the error "Unable to connect to any of the specified MySQL hosts" -

i making application connects remote mysql database cpanel account. created database on cpanel business relationship , defined username , password it. using mysqlconnector. far have written next code:

using mysql.data.mysqlclient; mysqlconnection c = new mysqlconnection("server = 64.191.12.54; database = alyataco_test4application; user id = xxxxxxxx; password = xxxxxxxx"); c.open();

but got error :

mysql.data.mysqlclient.mysqlexception: unable connect of specified mysql hosts.

i saw connect remote mysql database visual c# didn`t help too

your connection string seems wrong. try:

mysqlconnection c = new mysqlconnection("server=64.191.12.54; database=alyataco_test4application; uid=xxxxxxxx; pwd=xxxxxxxx");

see http://www.connectionstrings.com/mysql more connection string exemples.

c# mysql database mysql-connector

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -