Can anyone help please. I use the following .net code to connect to MySql database
using MySql.Data.MySqlClient;
MySqlConnection Conn = new MySqlConnection("server=localhost;Database=tbc_database;userid=tbc_user;password=xxxxxx;pooling=false");
Conn.Open();
MySqlCommand cmdEdit = new MySqlCommand(StrSql, Conn);
MySqlDataAdapter adptEdit = new MySqlDataAdapter(cmdEdit);
DataSet dsEdit = new DataSet();
cmdEdit.CommandType = CommandType.Text;
cmdEdit.ExecuteNonQuery();
adptEdit.Fill(dsEdit, "Dev");
It works on the development mashine, but can't connect to the database when page is on the server
I've tryed all possible connection strings like"server=mysql.x10hosting;Database=tbc_database;userid=tbc_user;password=xxxxxx;pooling=false"
added remote host as %.x10hosting.com.
All I get is "Unable to connect to any of the specified MySQL hosts" :eek4:
using MySql.Data.MySqlClient;
MySqlConnection Conn = new MySqlConnection("server=localhost;Database=tbc_database;userid=tbc_user;password=xxxxxx;pooling=false");
Conn.Open();
MySqlCommand cmdEdit = new MySqlCommand(StrSql, Conn);
MySqlDataAdapter adptEdit = new MySqlDataAdapter(cmdEdit);
DataSet dsEdit = new DataSet();
cmdEdit.CommandType = CommandType.Text;
cmdEdit.ExecuteNonQuery();
adptEdit.Fill(dsEdit, "Dev");
It works on the development mashine, but can't connect to the database when page is on the server
I've tryed all possible connection strings like"server=mysql.x10hosting;Database=tbc_database;userid=tbc_user;password=xxxxxx;pooling=false"
added remote host as %.x10hosting.com.
All I get is "Unable to connect to any of the specified MySQL hosts" :eek4: