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. Mac Os X Mysql driver install
Forum Updated to NodeBB v4.3 + New Features

Mac Os X Mysql driver install

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

    Hi,

    I want to use QMYSQL but when I try to compile:

    ~/Qt/5.10.0/clang_64/bin/qmake  -- MYSQL_PREFIX=/usr/local
    Project ERROR: You cannot configure sqldrivers separately within a top-level build.
    

    How can I use Mysql from Qt creator ? QSQLITE is ok but Mysql still not working ?

    Is there straight forward way to do this ?

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

      Hi,

      Where exactly are you calling qmake in ?

      What is your original problem ?

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

        Late night I found the solution:

        Mac Os X
        Qt 5.11 and mysql 5.7.23
        I used Qt internal setup:
        key is : MYSQL_LIBS=-lmysqld

        I hope it helps others

        Qt plugin mysql :  
        ~/Qt/5.11.0/Src/qtbase/src/plugins/sqldrivers/mysql
        make ve make install
        
        internal client kullan :
        mysql.pro:
        
        TARGET = qsqlmysql
        
        HEADERS += $$PWD/qsql_mysql_p.h
        SOURCES += $$PWD/qsql_mysql.cpp $$PWD/main.cpp
        
        MYSQL_LIBS=-lmysqld
        INCLUDEPATH +=/usr/local/Cellar/mysql@5.7/5.7.23/include/mysql
        #LIBS += -llibmysqld
        
        QMAKE_USE += mysql
        
        OTHER_FILES += mysql.json
        
        PLUGIN_CLASS_NAME = QMYSQLDriverPlugin
        include(../qsqldriverbase.pri)
        
        
        
        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