connect to mysql database on cpanel RRS feed

  • Question

  • hi 

    i am trying to connect to mysql database that is locatied on my cpanel  

      private void metroButton1_Click(object sender, EventArgs e)
                conString = "SERVER=;DATABASE=name;UID=name;PASSWORD=pass";
                    con = new MySqlConnection();
                    con.ConnectionString = conString;
                    MetroFramework.MetroMessageBox.Show(this, "Serveur est disponible.", "Connexion Au Serveur ", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                catch(MySql.Data.MySqlClient.MySqlException ex)

    i get error message : can't connect to the specified host 

    even though i did allow remote connection on my cpanel (%)

    and i am pretty sure of my database access

    any help

    Monday, October 9, 2017 11:23 AM

All replies