Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to install MySQL 8.0.19 - winx64 Driver?



  • Hello, please help me!

    • MySQL 8.0.19 - winx64
    • compiler mingw73_64
    • Qt 5.14.1

    Qt mysql.jpg

    1). In cmd - C:\Qt\5.14.1\Src\qtbase\src\plugins\sqldrivers> qmake -- MYSQL_INCDIR="C:\mysql\include" MYSQL_LIBDIR="C:\mysql\lib"
    2). When - mingw32-make.exe
    3). But cmd show me errors -

    g++: error: unrecognized command line option '-std=c++1z'
    g++: error: unrecognized command line option '-Wshift-overflow=2'
    g++: error: unrecognized command line option '-Wduplicated-cond'
    mingw32-make.exe[1]: *** [Makefile:838: .obj/qsql_sqlite.o] Error 1
    mingw32-make.exe[1]: Leaving directory 'C:/Qt/5.14.1/Src/qtbase/src/plugins/sqldrivers/sqlite'
    mingw32-make.exe: *** [Makefile:50: sub-sqlite-make_first] Error 2
    

    What am I doing wrong? Please tell me what must i do.


  • Qt Champions 2019

    @LimarDeWills said in How to install MySQL 8.0.19 - winx64 Driver?:

    What am I doing wrong?

    You're using an ancient MinGW compiler - make sure to use the one provided by the Qt installer (see als gcc --version output)



  • Christian Ehrlicher, thanks for help
    1). I completely uninstalled Qt.
    2). Reinstalled all components - Maintain Qt.jpg
    3). In cmd the same errors come out - Command Prompt.jpg

    Did I install something wrong?

    p.s.

    C:\Users\User>gcc --version
    gcc (i686-posix-sjlj, built by strawberryperl.com project) 4.9.2
    Copyright (C) 2014 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    

  • Qt Champions 2019

    gcc 4.9 is not the correct compiler. You have to set up your Qt environment correctly instead simply opening a cmd.exe



  • Please explain what needs to be done in the cmd to set up Qt environment?



  • I deleted all gcc, after that cmd started showing correct version


Log in to reply