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. MySQL driver

MySQL driver

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.1k 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.
  • D Offline
    D Offline
    danp
    wrote on last edited by
    #1

    I'm using Ubuntu. I installed Qt 5.1.1 using .run file and I couldn't connect to a mysql database (even though QSqlDatabase::drivers() showed it as available). I found out that I needed to recompile the mysql driver. And to do that I installed a package qmake 4.8.1. I couldn't compile the driver, I figured it's because of the version difference.

    Now I'm thinking it would be easier for me to just install Qt 4.8 instead but I'm not sure how to do that. There are Qt 4.8.1 libraries on the website, but I'm not sure what am I supposed to do with them. Should I compile them and get an IDE and connect them somehow or something? It's really frustrating, I've been trying to connect to mysql for days.

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

      Hi and welcome to devnet,

      You have to use the qmake coming with your 5.1.1 install.

      If drivers)= shows the QMySql driver it means the plugin's there. If it can't be loaded it probably means that you are missing some libraries on your system. Use ldd on the plugin to see whether there are missing dependencies and just install them. Then you should be good to go.

      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