MySql.Data 9.1.0

About

MySQL provides connectivity for client applications developed in .NET compatible programming languages with MySQL Connector/NET through a series of packages.

MySql.Data is the core package of Connector/NET. It is compatible with .NET Framework 4.6+ and .NET 6.0+ and provides classic MySQL protocol and MySQL X DevAPI capabilities.

More information at MySQL Connector/NET documentation.

How to use

    MySql.Data.MySqlClient.MySqlConnection myConnection;
    string myConnectionString;
    //set the correct values for your server, user, password and database name
    myConnectionString = "server=127.0.0.1;uid=root;pwd=12345;database=test";

    try
    {
      myConnection = new MySql.Data.MySqlClient.MySqlConnection(myConnectionString);
      //open a connection
      myConnection.Open();

      // create a MySQL command and set the SQL statement with parameters
      MySqlCommand myCommand = new MySqlCommand();
      myCommand.Connection = myConnection;
      myCommand.CommandText = @"SELECT * FROM clients WHERE client_id = @clientId;";
      myCommand.Parameters.AddWithValue("@clientId", clientId);

      // execute the command and read the results
      using var myReader = myCommand.ExecuteReader()
      {
        while (myReader.Read())
        {
          var id = myReader.GetInt32("client_id");
          var name = myReader.GetString("client_name");
          // ...
        }
      }
      myConnection.Close();
    }
    catch (MySql.Data.MySqlClient.MySqlException ex)
    {
      MessageBox.Show(ex.Message);
    }

Licensing

Please refer to files README and LICENSE, available in the Connector/NET GitHub repository, and Legal Notices in documentation for further details.

Security

Oracle values the independent security research community and believes that responsible disclosure of security vulnerabilities helps us ensure the security and privacy of all our users. Please refer to the security guidelines document for additional information.

Contributing

We greatly appreciate feedback from our users, including bug reports and code contributions. Your input helps us improve, and we thank you for any issues you report or code you contribute. Please refer to the contributing guidelines document for additional information.

Additional Resources

For more information about this and other MySQL products, please visit MySQL Contact & Questions.

Showing the top 20 packages that depend on MySql.Data.

Packages Downloads
MySql.EntityFrameworkCore
MySql.EntityFrameworkCore for Entity Framework.
25
MySql.EntityFrameworkCore
MySql.EntityFrameworkCore for Entity Framework.
24
MySql.EntityFrameworkCore
MySQL Server database provider for Entity Framework Core.
23
MySql.EntityFrameworkCore
MySql.EntityFrameworkCore for Entity Framework.
23
MySql.EntityFrameworkCore
MySql.EntityFrameworkCore for Entity Framework.
22
MySql.Data.EntityFramework
MySql.Data.EntityFramework
22
MySql.EntityFrameworkCore
MySQL Server database provider for Entity Framework Core.
22
MySql.EntityFrameworkCore
MySQL Server database provider for Entity Framework Core.
21
sqlSugarCore
.Net Core 2.0 SqlSugar ORM ,High-performance, lightweight https://github.com/sunkaixuan/SqlSugar
21
MySql.EntityFrameworkCore
MySQL Server database provider for Entity Framework Core.
20
MySql.EntityFrameworkCore
MySql.EntityFrameworkCore for Entity Framework.
20
sqlSugarCore
.Net Core 2.0 SqlSugar ORM ,High-performance, lightweight https://github.com/sunkaixuan/SqlSugar
20

Review ReleaseNotes.txt for details.

.NET Framework 4.6.2

.NET Standard 2.0

.NET 8.0

.NET Standard 2.1

.NET Framework 4.8

.NET 6.0

Version Downloads Last updated
9.1.0 1 10/22/2024
9.0.0 13 07/07/2024
8.4.0 13 05/03/2024
8.3.0 16 01/24/2024
8.2.0 16 11/25/2023
8.1.0 15 08/06/2023
8.0.33 22 06/02/2023
8.0.32.1 23 06/04/2023
8.0.32 23 06/04/2023
8.0.31 19 06/04/2023
8.0.30 23 06/04/2023
8.0.29 275 06/22/2022
8.0.28 22 06/04/2023
8.0.27 23 06/04/2023
8.0.26 23 06/04/2023
8.0.25 23 07/06/2021
8.0.24 23 06/04/2023
8.0.23 26 03/17/2021
8.0.22 24 06/04/2023
8.0.21 21 06/04/2023
8.0.20 19 06/04/2023
8.0.19 20 06/04/2023
8.0.18 21 06/04/2023
8.0.17 17 06/04/2023
8.0.16 38 01/18/2021
8.0.15 25 05/08/2021
8.0.14 18 06/04/2023
8.0.13 16 06/04/2023
8.0.12 20 06/04/2023
8.0.11 19 06/04/2023
6.10.9 18 06/04/2023
6.10.7 19 06/04/2023
6.9.12 18 06/04/2023
6.8.8 22 06/04/2023
6.7.9 23 06/04/2023