Connecting to external mysql database through C#/Visual Studio 2012 -


whenever try perform sql query insert on localhost, works, using simple c# code mysql.data reference in visual studio. when try connect own database have on webserver, gives me exception:

a first chance exception of type 'mysql.data.mysqlclient.mysqlexception' occurred in mysql.data.dll mysql.data.mysqlclient.mysqlexception (0x80004005): unable connect of specified mysql hosts.

is webserver bocking external requests visual studio / c#? how open server allow these requests?

thank you.

i had developed 1 application in c# in had used mysql database end stored @ bigrock.com. in application simple mistake in connection string. , turn off firewall , antivirus settings off.

this right format of mysql database connection string :-

string connectionstring = "server=your_server_name;uid=your_user_name;database=your_database_name;port=your_port_no;pwd=your_password;allow 0 datetime=true"; 

Comments