Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Qt Mysql driver issue

    Installation and Deployment
    3
    6
    1000
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • X
      XavierClinquart last edited by

      Hello ,

      Its my first time using the Mysql driver in a project.
      So far i succesfully made the driver and used it into my project.
      The project works fine on my development pc but when i now want to make a release version and try to run it onto the server i get following error:

      QSqlDatabase: QMYSQL driver not loaded
      QSqlDatabase: available drivers:
      Error

      I added all the ddl's and the plugins folder in my realease foder.

      Anyone have an idea what the reason might be behind this error? I have been trying to find a solution surfing around but without succes.

      Thanks

      Xavier

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Did you also deploy the MySQL .dll files with your software ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • X
          XavierClinquart last edited by XavierClinquart

          Hello,

          Sorry for the late reply i wasnt able to get to a pc during the wekend.

          these are the dll's i added :
          a folder with plugins that contanians sqldrivers folder with :

          • qsqlmysql.dll
          • qsqlmysqld.dll
            next to the folder i have :
          • my .exe
          • libgcc_s_dw2-1.dll
          • libstdc++-6.dll
          • libwinpthread-1.dll
          • Qt5Core.dll
          • Qt5Sql.dll

          Im unsure if i have all the ones you mean.

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            You still don't have the MySQL dlls deployed (not the Qt driver, the .dlls that come from your MySQL installation).

            To help with deployment, you can use the windeployqt helper program.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            PacoL85 1 Reply Last reply Reply Quote 0
            • PacoL85
              PacoL85 @SGaist last edited by

              @SGaist Hi, I have almost the same issue, my exe works fine on my computer not mattering on any folder that I use, I did use the windeployqt but how do I go about adding the mysql dlls on it with it? Or should I just paste the mysql.dll that you mention? wich dlls are?

              Thanks again

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                Hi and welcome to devnet,

                Yes just copy the mysql.dll besides your application.

                You can check what .dlls are needed using Dependency Walker

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post