I'm currently developing a c# Login system, but the mysql part won't work.
already tried sudo ufw allow 3306/tcp, but still the error. Also tried with HeidiSql
"Can't connect to MySQL server on '5.230.22.130' (10061)
and yes, the user is %, not localhost!!
Error message:
"SocketException: Unable to connect because the destination computer refused to connect Server 5.230.22.130"
class DB
{
private MySqlConnection connection =
new MySqlConnection("Datasource=5.230.22.130;Port=3306;Database=***;uid=sqlAdmin;pwd=***;");
public void openConnection()
{
if (connection.State == System.Data.ConnectionState.Closed)
{
connection.Open();
}
}
public void closeConnection()
{
if (connection.State == System.Data.ConnectionState.Open)
{
connection.Close();
}
}
public MySqlConnection getConnection()
{
return connection;
}
}