The latest version of MySql is 5.x. The first time I came into contact with it was when I was a sophomore in college, using php. At that time, it seemed that it was still version 4.x.
Mysql5 has added many new features and started to support: stored procedures, triggers, views, information architecture views, etc...
MySql is as complicated as ever during installation, and it is often a failure prompt and nothing else. Prompt reason.
This is an article comparing MySql and SqlServer, http://htm.winsteps.net/database/331.htm
There is very little information on the MySql Chinese website http://www.mysql.cn/ , mostly installation help.
To check information, go to the MySql website http://www.mysql.com/.
MySql now provides various connection tools (http://dev.mysql.com/downloads/connector/). Connector/ODBC and Connector/Net can be used under .net.
ODBC connection efficiency may be slightly lower, it is best to use Net direct connection
This article introduces various connection methods http://www.mysql.com/news-and-events/press-release/ release_2002_10.html
1: ODBC connection
The current version is 3.51. After installation, you can do this:
// string conStr = "DRIVER = {MySQL ODBC 3.51 Driver}; SERVER = localhost; DATABASE = test; UID = root; PASSWORD=;";
//string conStr = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=test;USER=root;PASSWORD=;OPTION=3;";
string conStr = "provider = MySQL ODBC 3.51 Driver; SERVER = localhost; DATABASE =test; UID = root; PASSWORD=;";
try
{
OleDbConnection connection = new OleDbConnection(conStr) ;
connection.Open();
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
2: Net connection:
MySQL Connector Net 1.0.7: There are four versions of connector: net1.0; net.1; net2.0; mono1.0. Free
CoreLab.MySql 3.5: This is a commercial version with a 30-day trial period.
The code below is an example of using MySQL Connector Net. Note: The prefix of his Parameter is "?" instead of "@". This problem is rather special. The prefix of Parameter in CoreLab is "@".