Guest User

Untitled

a guest
Aug 20th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using MySql.Data;
  11. using MySql.Data.MySqlClient;
  12. namespace conexionb
  13. {
  14. public partial class Form1 : Form
  15. {
  16.  
  17. public Form1()
  18. {
  19. InitializeComponent();
  20. }
  21.  
  22. private void btnconectar_Click(object sender, EventArgs e)
  23. {
  24.  
  25. MySqlConnection conexion = new MySqlConnection();
  26. conexion.ConnectionString = "Server=127.0.0.1;Database=localhost; Uid=root;Pwd=;SslMode=none";
  27. conexion.Open();
  28.  
  29. }
  30. }
  31. }
  32.  
  33. server={0};user id={1};password={2};persistsecurityinfo=True;port={3};database={4};SslMode=none
Add Comment
Please, Sign In to add comment