CSharp examples for Database:MySQL
Get Connection to MySQL
using System.Threading.Tasks; using System.Text; using System.Linq; using System.Data; using System.Collections.Generic; using System;/*ww w . ja v a2 s . c o m*/ using MySql.Data.MySqlClient; public class Main{ public static MySqlConnection GetConnection() { string connStr = "server=localhost;user id=root;password=;database=mysql"; MySqlConnection rvalue = new MySqlConnection(connStr); return rvalue; } }