C# + MySQL DB don't work in debug -
i have problem mysql database , .net freamwork.
i have 2 applications asp.net mvc , desktop connect database on azure (mysql). when run asp.net mvc application on localhost , desktop application can not connect database , exception:
[ioexception: unable read data transport connection: connection attempt failed because connected party did not respond after period of time, or established connection failed because connected host has failed respond.]
but when publish asp.net application in azure have database app work perfect database.
i think may have blocked port 3306 on system or internet can connect database via mysql workbench , there realize queries database if program can why have problem ?
simple code
mysqlconnection conn = new mysqlconnection("server=eu-cdbr-azure-west-d.cloudapp.net;database=brydz;uid=----;password=----;allow user variables=true"); try { string nazwa=""; conn.open(); string query = "select nazwa gracze gracz_id='" + 1 + "'"; mysqlcommand cmd = new mysqlcommand(query, conn); mysqldatareader rdr = cmd.executereader(); while (rdr.read()) nazwa = rdr.getstring(0);