private void button1_Click(object sender, EventArgs e) { server = "178.250.xxx.xxx/myadmin"; database = "test"; uid = "test"; password = "password"; string connectionString; connectionString = "SERVER=" + server + ";" + "DATABASE=" + database + ";" + "UID=" + uid + ";" + "PASSWORD=" + password + ";"; connection = new MySQLConnection(connectionString); connection.Open(); // show error MySQLCommand cmd; cmd = new MySQLDriverCS.MySQLCommand("select * from Code", connection); MessageBox.Show(cmd.CommandText); cmd.ExecuteNonQuery(); }
MySQLDriverCS Exception: MySQLDriverCS Error: can't connect.Can't connect to MySQL server on 'localhost' (10061)
Server=ipaddress;Port=3306;Database=test;Uid=test;Pwd=password
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)