Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void button1_Click(object sender, EventArgs e)
- {
- try
- {
- string myConnection = "datasource=localhost;port=3310;username=root;password=root";
- MySqlConnection myConn = new MySqlConnection(myConnection);
- myConn.Open();
- MessageBox.Show("Connected");
- myConn.Close();
- MessageBox.Show("Disconnected");
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement