Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt Mysql driver issue
QtWS25 Last Chance

Qt Mysql driver issue

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 3 Posters 1.4k Views
  • 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 Offline
    X Offline
    XavierClinquart
    wrote on last edited by
    #1

    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
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      0
      • X Offline
        X Offline
        XavierClinquart
        wrote on last edited by XavierClinquart
        #3

        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
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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

          PacoL85P 1 Reply Last reply
          0
          • SGaistS SGaist

            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.

            PacoL85P Offline
            PacoL85P Offline
            PacoL85
            wrote on last edited by
            #5

            @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
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              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
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved