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. QSqlDatabase: QMYSQL driver not loaded - Ubuntu
Forum Updated to NodeBB v4.3 + New Features

QSqlDatabase: QMYSQL driver not loaded - Ubuntu

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 4.0k 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.
  • G Offline
    G Offline
    Gangani Chamika
    wrote on last edited by
    #1

    0
    down vote
    favorite

    I'm using Qt5.10.0 and try to connect to MySQL database in Linux platform. I got an error like below...

    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7

    I searched a lot to fix this error. But unable to fix this. Please help me with this and suggest what should I do?

    JonBJ 1 Reply Last reply
    0
    • G Gangani Chamika

      0
      down vote
      favorite

      I'm using Qt5.10.0 and try to connect to MySQL database in Linux platform. I got an error like below...

      QSqlDatabase: QMYSQL driver not loaded
      QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7

      I searched a lot to fix this error. But unable to fix this. Please help me with this and suggest what should I do?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Gangani-Chamika
      Did you apt-get libqt5-sql-mysql ? Or however you are choosing to install stuff.

      1 Reply Last reply
      2
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        Its important to understand that the MySQL included with Qt do not
        include the actual "drivers" for the database system.
        Its a wrapper that will load the system installed "drivers" and you
        must install those yourself as @JonB explains.

        There are many post on forum about using MySql, however this i find paticular
        informative when using linux.
        http://adamcavendish.is-programmer.com/posts/40431.html

        1 Reply Last reply
        3
        • J Offline
          J Offline
          JulioMARIE
          wrote on last edited by
          #4

          Hi,please if you solve this problem,share with us...Thanks

          JonBJ 1 Reply Last reply
          0
          • J JulioMARIE

            Hi,please if you solve this problem,share with us...Thanks

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #5

            @JulioMARIE
            The OP is not going to respond, as he will have disappeared into the Blue Void :)

            However, if you have the same problem as him, you too will need to:

            Did you apt-get libqt5-sql-mysql ? Or however you are choosing to install stuff.

            1 Reply Last reply
            1

            • Login

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