C# Mysql

04/17/2012 14:57 subsauber#1
Bonjour,
Ich habe mal wieder ein kleines Problem ;)
Ich habe mir eine WindowsForm erstellt und versucht eine Verbindung zur Mysql Datenbank im Internet herzustellen, aber irgendwie bekomme ich keine Verbindung... :(


PHP Code:
 private void button1_Click(object senderEventArgs e)
        {
            
string myConnectionString "HOST=fobojo.bplaced.net" "SERVER=localhost;" "DATABASE=fobojo_test;" "UID=fobojo_test;" "PASSWORD=12345;";

            
MySqlConnection connection = new MySqlConnection(myConnectionString);
            try
            {
                
connection.Open();
                if (
connection.State == ConnectionState.Open)
                {
                    
MessageBox.Show("Sie wurden erfolgreich mit Fobojo.bplaced.net verbunden ;)");
                    
connection.Close();
                }
            }
            catch (
Exception exception)
            {
                
MessageBox.Show(exception.Message);
                
connection.Close();
            }
        } 
04/17/2012 17:59 Rainvair#2
1.) bplaced lässt afaik keine externen Zugriffe zu.
2.) Die Daten im Code offen stehen zu haben ist "nicht ganz so schlau".
04/19/2012 17:04 subsauber#3
1. Danke
2. war eine test db