title: Connecting MySQL to Visual Studio C#
body: <p>I'm trying to write data access code to connect MySQL to visual studio. I have this code so far, but I do not know if it's correct. I'm using my books and have commented out a few other things, but I received errors when I included the commented out information.</p>
  
  <pre><code>public static MySqlConnection getconnection()
  
  {
  string connectionstring = "serve=r127.0.0.1; uid = root;" + "pwd = databasses; database = group1;"
  
  MySqlConnection connection = new MySqlConnection(connectionstring);
  return connection;
  }
  </code></pre>
  
  <p>Commented out information:</p>
  
  <pre><code>//string connectionstring = "Data Source=localhost\\MySql;Initial Catalog = group1; Integrated Security=True";
  
  and
  
  //conection.Open();
  </code></pre>
  
  <p>Is there a way for me to check if my connection is made? I am able to run it and display a blank form, but I'm worried it's wrong. </p>