Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Feedback Here is the solution for connecting to a MySQL DB from Unity - tested: 2019.3

Discussion in 'Formats & External Tools' started by Slarti-42, Feb 17, 2020.

  1. Slarti-42


    Jul 1, 2019
    Hi folks,

    I have been struggling to get this running for a long time, but I finally succeeded.

    Be aware, that connecting directly to a DB is always a risk, which if you have to, mitigate it! There are enough tips out there.

    My problem, in the end, came down to which version of MySql.Data.dll I am using. I am using a NET 3.5 version. There are no errors! Just put it into any folder in your Assets. I have tried 2.0 older once, newer ones, but never came across this one.

    I have found this .dll using the Asset Store and imported: SR Database Explorer, but only the .dll.

    Inside Unity, I have the player(Asset/Project Settings/Player/Api Compatibility Level/) set to .NET 4.x, but I just tested it for 2.0. No issues.

    Hope this helps folks