title: Troubles reconnecting to MySQL database from C#
body: <p>I can successfully log on to the database with this:</p>
  
  <pre><code>MySqlConnection conn = new MySqlConnection();
  MySqlConnectionStringBuilder connString = new MySqlConnectionStringBuilder();
  
  connString.Server = textEditServer.Text;
  connString.UserID = "root";
  connString.Password = textEditServerPassword.Text;
  connString.Database = "geysercontrol";
  conn.ConnectionString = connString.ConnectionString;
  
  try
  {
       conn.Open();
       Properties.Settings.Default.Properties["ConnectionString"].DefaultValue = conn.ConnectionString;
       conn.Close();
  }
  catch (MySqlException)
  {
        XtraMessageBox.Show("No connection could be established");
  }
  </code></pre>
  
  <p>But when I try to use the ConnectionString property to reconnect with different class, I get an MySQLException saying </p>
  
  <pre><code>Access denied for user 'root'@'localhost' (using password: NO)
  </code></pre>
  
  <p>What can be the possible causes to this? The page on possible causes on the MySQL website doesn't include my situation.</p>
  
  <p>The code I use to reconnect is:</p>
  
  <pre><code> connection = new MySqlConnection();
   connection.ConnectionString = (String)Properties.Settings.Default.Properties["ConnectionString"].DefaultValue;
   connection.Open();
  </code></pre>
  
  <p>And the connectionString definitely is the same in both cases. It is:</p>
  
  <pre><code>server=localhost;User Id=root;database=geysercontrol;password=password
  </code></pre>