Mysql drivers mac



  • Hi

    I want to use mysql on my app. I have these errors :

    QSqlDatabase: QMYSQL3 driver not loaded
    QSqlDatabase: available drivers: QSQLITE
    

    So i tried to compile and install MYSQL driver on Mac OS:

    • I downloaded Mysql for mac
    • I have Qt 5.5.1

    On my Qt src : Qt/5.5/clang_64/plugins/sqldrivers i have these files :
    libqsqlite.dylib libqsqlodbc.dylib
    libqsqlite_debug.dylib libqsqlodbc_debug.dylib
    libqsqlmysql.dylib libqsqlpsql.dylib
    libqsqlmysql_debug.dylib libqsqlpsql_debug.dylib

    I dont have mysql.pro, i can't run a qmake :

    qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
    

    I tried to download qt src, but they dont have any mysql folder.
    How can i do ?

    Thanks in advance


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What sources did you download ? You have an option in the installer to get the sources that matches your installed Qt.

    If you take the time to search the forum, you'll find several threads about the MySQL plugin and OS X.



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.