RE: C#, connect to MySQL database 11-18-2016, 04:37 PM
#2
(11-18-2016, 04:32 PM)Skryptec Wrote: Hello,
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
Everything seems ok.
Does the mySQL server allow your user to access it from your ip address?












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