none
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=185.3.166.205;DATABASE=name;UID=name;PASSWORD=pass";
                try
                {
                    con = new MySqlConnection();
                    con.ConnectionString = conString;
                    con.Open();
                    MetroFramework.MetroMessageBox.Show(this, "Serveur est disponible.", "Connexion Au Serveur ", MessageBoxButtons.OK, MessageBoxIcon.Hand);
              
    
                }  
    
                catch(MySql.Data.MySqlClient.MySqlException ex)
                {
                    MessageBox.Show(ex.Message);
                }
                    }

    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