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. QT5 mysql Driver not loaded (solved)
Forum Updated to NodeBB v4.3 + New Features

QT5 mysql Driver not loaded (solved)

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 3 Posters 1.6k Views 1 Watching
  • 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.
  • H Offline
    H Offline
    hypnomaki
    wrote on last edited by
    #1

    I've Installed QT creator + QT via the QT Maintenance Tool and after that I've installed the package "libqt5sql5-mysql" via apt-get. Its installed in "/usr/lib/i386-linux-gnu/qt5/plugins/sqldrivers/libqsqlmysql.so". Im running a Linux Mint Mate 17.

    When i start my Application i get the following Error: "Driver not loaded Driver not loaded".
    Why QT-Creator wont recognize mysql even if its installed in the qt5 dir.?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you have the MySQL client libraries installed on your computer ?

      On a side note, it's Qt, QT stands for Apple QuickTime.

      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
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        Define QT_DEBUG_PLUGINS=1 in your environment when you run your application. Qt will display debug information on it trying to load plugins. Look for issues regarding the loading of the mysql driver.

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hypnomaki
          wrote on last edited by
          #4

          I solved it!
          @SGaist, yes i did but that wasnt the problem.
          @Andre, Thx for that info, i did as you adviced and saw that QT was looking for the lib in the wrong path.
          Because of the fact that I installed QT-Creator and libs via theQT Maintenance Tool all QT-Related Data was installed on /opt/QT...
          But I Installed the mysql lib via the repo so it was installed to /usr/lib/...
          So i moved the lib but got an error according the version. of the lib.
          Then i removed QT creator incl. libs via the maintenance tool and Installed it via the Repo. So everything works fine now.
          You just make sure that you install all via repo or all manually.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            When using Qt from the installer you can have a mismatch between the MySQL client libraries from your system and the one used to build the plugin. In that case you can simply rebuild the plugin

            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