Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Deploying MySql program
Forum Updated to NodeBB v4.3 + New Features

Deploying MySql program

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 170 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.
  • AslundA Offline
    AslundA Offline
    Aslund
    wrote on last edited by
    #1

    Hello everyone

    I have developed a 64-bit Qt Desktop application that uses MySQL.
    Basically everything is working fine when running the program from QtCreator. The qsqlmysql driver is loaded together with the mysql driver.
    When I prepare to deploy the project, then I am unable to load QMYSL
    The error is as followed.

    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QODBC QPSQL
    

    I am using qtwindeploy and I have the .exe file in a folder together with all the libraries.
    I have tried to put the libmysql file next to the .exe file, but it is not working. I have tried to put it into the sqldrivers directory without luck either.

    Am I missing something obvious?

    Christian EhrlicherC 1 Reply Last reply
    0
    • AslundA Aslund

      Hello everyone

      I have developed a 64-bit Qt Desktop application that uses MySQL.
      Basically everything is working fine when running the program from QtCreator. The qsqlmysql driver is loaded together with the mysql driver.
      When I prepare to deploy the project, then I am unable to load QMYSL
      The error is as followed.

      QSqlDatabase: QMYSQL driver not loaded
      QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QODBC QPSQL
      

      I am using qtwindeploy and I have the .exe file in a folder together with all the libraries.
      I have tried to put the libmysql file next to the .exe file, but it is not working. I have tried to put it into the sqldrivers directory without luck either.

      Am I missing something obvious?

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      See https://doc.qt.io/qt-6/sql-driver.html#qmysql

      "When you distribute your application, remember to include libmysql.dll / libmariadb.dll in your installation package. It must be placed in the same folder as the application executable. libmysql.dll additionally needs the MSVC runtime libraries which can be installed with vcredist.exe"

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      2

      • Login

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