C#, connect to MySQL database 11-18-2016, 04:32 PM
#1
Hello,
I've installed the MySql.ConnectorNET.Data package and even some others to test.
Problem is, it doesn't work.
It returns this error.
Does anyone know how to fix it?
I literally copied it from here and it doesn't work.
https://dev.mysql.com/doc/connector-net/...-open.html
I've installed the MySql.ConnectorNET.Data package and even some others to test.
Code:
MySql.Data.MySqlClient.MySqlConnection conn;
string myConnectionString;
myConnectionString = "server=sql212.ihostfull.com;uid=uoolo_lolno;" +
"pwd=lolno;database=uoolo_lolno_test;";
try
{
conn = new MySql.Data.MySqlClient.MySqlConnection();
conn.ConnectionString = myConnectionString;
conn.Open();
MessageBox.Show("This shit finally working.");
}
catch (MySql.Data.MySqlClient.MySqlException ex)
{
MessageBox.Show(ex.Message);
}Problem is, it doesn't work.
It returns this error.
Code:
Unable to connect to any of the specified MySQL hosts.Does anyone know how to fix it?
I literally copied it from here and it doesn't work.
https://dev.mysql.com/doc/connector-net/...-open.html










![[Image: oAqtc2l.png]](https://i.imgur.com/oAqtc2l.png)
![[+]](https://sinister.li/images/modern/collapse_collapsed.png)




![[Image: 9H83e18.png]](https://i.imgur.com/9H83e18.png)