Right-click the link, then select Add Link. Find and select Mysql.Data.dll .
The DLL should be found in the installation directory of the connector you downloaded.

Finally, in the code:
using MySql.Data.MySqlClient;
And, an example connection:
MySqlConnection connection = new MySqlConnection("Database=database_name;Data Source=server_domain_or_ip;User Id=mysql_user;Password=mysql_password"); connection.Open(); MySqlCommand command = connection.CreateCommand(); command.CommandText = "select * from mytable"; MySqlDataReader reader = command.ExecuteReader(); while (reader.Read()) { //reader.GetString(0) //reader["column_name"].ToString() } reader.Close();
source share