CData ADO.NET Provider for MySQL FAQs, Community Resources, & Troubleshooting

Frequently Asked Questions

  • What versions of .NET does the CData ADO.NET Provider for MySQL support?

    CData ships assemblies for .NET 4.x, .NET Standard 2.0 and .NET 8.0

  • What versions of Microsoft Visual Studio are supported?

    The CData ADO.NET Provider for MySQL supports Visual Studio versions 2012 and above

  • What versions of Entity Framework does the CData ADO.NET Provider for MySQL support?

    Entity Framework 6, Entity Framework Core 8.0

  • What operating systems does the CData ADO.NET Provider for MySQL support?

    CData ADO.NET Providers ship with multiple assemblies:

    • .NET Framework 4 assemblies run on Windows environments with x64 processors
    • .NET Standard 2 and .NET 8 assemblies run on Windows, Linux, and Mac environments with both x64 and ARM64 processors

  • What is the distribution or licensing options with the CData ADO.NET Provider for MySQL Community License?

    The Community License allows you to install the Provider on one (1) desktop or workstation for personal use, development, or testing.

    A Per-Developer license allows you to install and internally use the Provider on any number of desktops or workstations with options for royalty-free distribution within your organization.

  • What version of MySQL is supported?

    The CData ADO.NET Provider for MySQL enables connectivity to MySQL Server 5.0 or later.

  • What authentication schemes are supported by the CData ADO.NET Provider for MySQL?

    The CData ADO.NET Provider for MySQL supports authentication to MySQL via the following types of authentication schemes:

    • Standard (Password)
    • NT Lan Manager (NTLM)
    • LDAP
    • SSL
    • SSH
    • Azure
    • AWS

Community resources

Visit the Developer Community to browse ADO.NET articles and ADO.NET questions, ask your own question, or start a conversation!

Common errors and troubleshooting

  • I'm seeing the error message: 'Access denied for user user@serverHost (using password: YES)'

    This is a common connection error thrown by MySQL, often caused by an incorrect/misspelled username or password, or the user has insufficient permissions to access the MySQL server. To resolve this error, verify that the provided credentials are correct and that the user has the necessary privileges to connect to the server.

  • I'm seeing the error message: 'Access denied for user user@serverHost (using password: NO)'

    This connection error is thrown by MySQL when a user attempts to connect without providing a password. To resolve this error, ensure that the correct password is set for the authenticating user.

  • The Provider is not showing in the Server Explorer or model builder's data source dropdown

    This can occur if there is an issue with installing the driver's Visual Studio extension. To remedy this, please close Visual Studio, as it must be closed for the installation to succeed. Then, please go to the lib subfolder of your installation directory and double-click the .vsix file that matches your version of Visual Studio (so if you're using Visual Studio 2022, you would click System.Data.CData.MySQL.2022.vsix). Upon reopening Visual Studio, the provider should appear.

  • The assembly for an older version is being cached

    Visual Studio will sometimes cache old assemblies, so for instance, if you're using v22 and upgrade to v23, when you add references to the v23 assemblies, it will change them to v22 assemblies. This can happen even after you've deleted the old version and cleaned/rebuilt the project. There are a few potential solutions for fixing this, such as right clicking the assembly, going to Properties, and looking at the Path that is listed. Creating a new project with the correct reference or deleting the old assembly listed in that path can resolve this issue, and the links below provide other potential solutions to this.

  • I'm seeing the error message: 'An item with the same key has already been added'

    This error can occur when running the model builder, and it typically indicates that there is a duplicate column name. To resolve this, you will need to remove the duplicate before running the model builder again.

  • Errors when Reverse Engineering (Scaffolding) the data model:

    • I'm seeing the error message: “The term 'Scaffold-DbContext' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.”

      This error means you likely haven't installed the necessary Entity Framework Core tools package, "Microsoft.EntityFrameworkCore.Tools”, in your project, which is required to use the "Scaffold-DbContext" command. To resolve this, use the NuGet Package Manager to add the "Microsoft.EntityFrameworkCore.Tools” package to your project.

    • I'm seeing the error message: “Unable to find provider assembly 'CData.EntityFrameworkCore.MySQL. Ensure the name is correct and it's referenced by the project.”

      This error means that you likely haven't added a reference “CData.EntityFrameworkCore.MySQL.dll” in your project. To resolve this, add a reference to “CData.EntityFrameworkCore.MySQL.dll”, located in the lib -> net8.0 -> EFCORE80 subfolder in the installation directory.

    • I'm seeing the error message: “Could not load file or assembly 'System.Data.CData.MySQL, Version=24.0.0.40, Culture=neutral, PublicKeyToken=f57f3fbecba6b076'. The system cannot find the file specified.”

      This error means that you likely haven't added a reference “System.Data.CData.MySQL.dll” in your project. To resolve this, add a reference to “System.Data.CData.MySQL.dll”, located in the lib -> net8.0 subfolder in the installation directory.

    • I'm seeing the error message: “The type 'DbContextOptionsBuilder' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.EntityFrameworkCore, Version=8.0.0.0…”

      This error means you likely haven't installed the necessary Entity Framework Core package, "Microsoft.EntityFrameworkCore”, in your project. To resolve this, use the NuGet Package Manager to add the "Microsoft.EntityFrameworkCore” package to your project.

    • I'm seeing the error message: “'KeyBuilder' does not contain a definition for 'HasName' and no accessible extension method 'HasName' accepting a first argument of type 'KeyBuilder' could be found (are you missing a using directive or an assembly reference?)”

      This error means you likely haven't installed the necessary Entity Framework Core relational package, "Microsoft.EntityFrameworkCore.Relational”, in your project. To resolve this, use the NuGet Package Manager to add the "Microsoft.EntityFrameworkCore.Relational” package to your project.

Free Community License for data developers

The CData MySQL ADO.NET Provider can seamlessly integrate your .NET applications with your MySQL data. With the CData ADO.NET Provider for MySQL Community License, you get free-forever libraries to access your data in personal .NET projects, all through familiar SQL. Request a license and start building MySQL-connected apps today!