Unable to connect to any of the specified MySQL hosts in c# windows form -


i want connect windows form application mysql .it works local mysql server perfectly.but didn't work in online mysql.

my code

string mysqlconnection = "server=mysql.main-hosting.com;database=xxxxxxxxx;uid=yyyyyyy;password=zzzzzzzz;"; mysqlconnection connection = new mysqlconnection(mysqlconnection); connection.open(); 

it shows unable connect of specified mysql hosts..how solve this?

try

server=mysql.main-hosting.com;database=xxxxxxxxx;user id=yyyyyyy;password=zzzzzzzz; 

instead of

server=mysql.main-hosting.com;database=xxxxxxxxx;uid=yyyyyyy;password=zzzzzzzz; 

maybe connectionstring problem.

or otherwise server address wrong.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -