I am trying to connect my c# program to my website database. When i run the program and click the button to activate the connection the try catch block catches this error.
server = "MY WEBSITE IP,PORT";
database = "DATABASE NAME";
uid = "USER FOR THE DATABASE";
password = "PASSWORD FOR THE USER";
try
{
string myConnection = "SERVER=" + server + ";" + "DATABASE=" + database + ";" + "UID=" + uid + ";" + "PASSWORD=" + password + ";";
MySqlConnection myConn = new MySqlConnection(myConnection);
MySqlCommand SelectCommand = new MySqlCommand("CREATE DATABASE FancyDatabase;",myConn);
MySqlDataReader myReader;
myConn.Open();
myReader = SelectCommand.ExecuteReader();
myConn.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}