+ Reply to Thread
Results 1 to 2 of 2

Thread: MySQL driver building error

  1. #1
    Join Date
    Nov 2017
    Qt products

    Default MySQL driver building error

    My resources:

    OS windows 10 Pro 64 bit
    Qt :Qt Creator 4.4.1 Based on Qt 5.9.2 (MSVC 2015, 32 bit)
    MinGW bit

    First when I try to got to cd %QTDIR%/src/qtbase/src/plugins/sqldrivers/mysql in min gw

    I get this The system cannot find the path specified.

    Then I hive my exat path (cd C:\Qt\Qt5.9.2\5.9.2\Src\qtbase\src\plugins\sqldriv ers\mysql) and MinGW goes to the folder

    Then we are supposed to give include and bin paths of the mysql-connector-c-6.1.11-win32 file in the following line.

    qmake "CONFIG+=release" "INCLUDEPATH+=C:\Program Files (x86)\MySQL\mysql-connector-c-6.1.11-win32\include" "C:\Program Files (x86)\MySQL\mysql-connector-c-6.1.11-win32\lib" "LIBS+=-llibmysql" mysql.pro

    Then it gives this giant error

    Cannot read C:/Program Files (x86)/MySQL/mysql-connector-c-6.1.11-win32/lib: Access is denied.
    Error processing project file: C:\Program Files (x86)\MySQL\mysql-connector-c-6.1.11-win32\lib
    Cannot find file: mysql.pro.

    Please help !!!!

  2. #2
    Join Date
    Nov 2017
    Jaipur, Rajashtan India
    Qt products
    Qt4 Qt5

    Smile Re: MySQL driver building error

    I think error can removed by using

    CONFIG += release


    INCLUDEPATH += C:\Program Files (x86)\MySQL\mysql-connector-c-6.1.11-win32\include

    win32: LIBS += C:\Program Files (x86)\MySQL\mysql-connector-c-6.1.11-win32\include\lib\ -llibmysql

    in your .pro file

    if not working then try by adding

    win32:CONFIG(release, debug|release): LIBS += C:\Program Files (x86)\MySQL\mysql-connector-c-6.1.11-win32\include\lib\ -llibmysql
    else:win32:CONFIG(debug, debug|release): LIBS += C:\Program Files (x86)\MySQL\mysql-connector-c-6.1.11-win32\include\lib\ -llibmysqld

+ Reply to Thread

Similar Threads

  1. Replies: 2
    Last Post: 24th April 2014, 12:17
  2. Building MySql driver
    By mentalmushroom in forum Qt Programming
    Replies: 1
    Last Post: 5th January 2014, 12:45
  3. error building qt mysql driver
    By Capton in forum Newbie
    Replies: 1
    Last Post: 16th July 2013, 13:06
  4. Building a static mysql driver
    By ThE_-_BliZZarD in forum Installation and Deployment
    Replies: 3
    Last Post: 15th October 2010, 12:56


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts