Advertisement
Guest User

Untitled

a guest
Apr 15th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. private void button1_Click(object sender, EventArgs e)
  2. {
  3. try
  4. {
  5. string myConnection = "datasource=localhost;port=3310;username=root;password=root";
  6. MySqlConnection myConn = new MySqlConnection(myConnection);
  7. myConn.Open();
  8. MessageBox.Show("Connected");
  9. myConn.Close();
  10. MessageBox.Show("Disconnected");
  11. }
  12. catch (Exception ex)
  13. {
  14.  
  15. MessageBox.Show(ex.Message);
  16. }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement