MySQL Plugins for Qt5.15.0
-
Hi,
Please search the forum. This question or one of its variants comes almost every week.
Oracle has changed its licensing so currently the pre-built binaries do not ship with the plugin pre-built anymore. You have to build it yourself. The instructions can be found in the Qt documentation here. Depending on the license you want to use, you should go with MariaDB. -
@SGaist , I got at far as:
make sub-mysql
Then ran into problems. My sqldrivers folder:
~/Qt/5.15.0/Src/qtbase/src/plugins/sqldrivers
Contains:
total 240 -rw-r--r-- 1 simonplatten staff 42994 9 Nov 12:45 Makefile -rw-r--r-- 1 simonplatten staff 233 11 May 2020 README -rw-r--r-- 1 simonplatten staff 13809 9 Nov 12:45 config.cache -rw-r--r-- 1 simonplatten staff 13962 9 Nov 12:45 config.log -rw-r--r-- 1 simonplatten staff 24 9 Nov 12:45 config.opt -rw-r--r-- 1 simonplatten staff 477 9 Nov 12:45 config.summary drwxr-xr-x 6 simonplatten staff 192 9 Nov 12:45 config.tests -rw-r--r-- 1 simonplatten staff 8384 11 May 2020 configure.json -rw-r--r-- 1 simonplatten staff 2905 11 May 2020 configure.pri drwxr-xr-x 8 simonplatten staff 256 2 Jul 06:05 db2 drwxr-xr-x 7 simonplatten staff 224 2 Jul 06:05 ibase drwxr-xr-x 3 simonplatten staff 96 9 Nov 12:46 lib drwxr-xr-x 4 simonplatten staff 128 9 Nov 12:46 mkspecs drwxr-xr-x 8 simonplatten staff 256 2 Jul 06:05 mysql drwxr-xr-x 8 simonplatten staff 256 2 Jul 06:05 oci drwxr-xr-x 8 simonplatten staff 256 2 Jul 06:05 odbc drwxr-xr-x 3 simonplatten staff 96 9 Nov 12:46 plugins drwxr-xr-x 8 simonplatten staff 256 2 Jul 06:05 psql -rw-r--r-- 1 simonplatten staff 224 11 May 2020 qsqldriverbase.pri -rw-r--r-- 1 simonplatten staff 0 9 Nov 12:45 qtsqldrivers-config.h -rw-r--r-- 1 simonplatten staff 338 9 Nov 12:45 qtsqldrivers-config.pri -rw-r--r-- 1 simonplatten staff 318 9 Nov 12:45 qtsqldrivers-config_p.h -rw-r--r-- 1 simonplatten staff 505 11 May 2020 sqldrivers.pro drwxr-xr-x 12 simonplatten staff 384 9 Nov 12:47 sqlite drwxr-xr-x 8 simonplatten staff 256 2 Jul 06:05 sqlite2 drwxr-xr-x 8 simonplatten staff 256 2 Jul 06:05 tds
It doesn't contain sub-mysql.
-
@SPlatten said in MySQL Plugins for Qt5.15.0:
It doesn't contain sub-mysql
sub-mysql is a build target in the Makefile
"Then ran into problems" - what problems?
Did it compile?
Did you run "make install"? -
Running configuration tests... Done running configuration tests. Configure summary: Qt Sql Drivers: DB2 (IBM) .............................. no InterBase .............................. no MySql .................................. no OCI (Oracle) ........................... no ODBC ................................... no PostgreSQL ............................. no SQLite2 ................................ no SQLite ................................. yes Using system provided SQLite ......... no TDS (Sybase) ........................... no Qt is now configured for building. Just run 'make'. Once everything is built, you must run 'make install'. Qt will be installed into '/Users/simonplatten/Qt/5.15.0/clang_64'. Prior to reconfiguration, make sure you remove any leftovers from the previous build.
I went through this process for Qt5.14.2 and built ok.
-
@SPlatten said in MySQL Plugins for Qt5.15.0:
MySql .................................. no
As you can see MySql was not enabled. Check the config.log file for details (probably MySQL client library/header were not found).
-
@jsulm I know I struggled with this before, and unfortunately I didn't keep notes which is very unlike me, usually I keep very detailed notes...but I can see that I installed MariaDB via Homebrew, this creates a Homebrew folder in:
/usr/local/Homebrew
MariaDB appears to be installed in:
lrwxr-xr-x 1 simonplatten admin 29 9 Nov 12:52 mysql-client -> ../Cellar/mysql-client/8.0.22 lrwxr-xr-x 1 simonplatten admin 29 9 Nov 12:52 mysql-client@8.0 -> ../Cellar/mysql-client/8.0.22
Found this on my search for a solution, I must be getting old:
https://mariadb.com/kb/en/mariadb-set-up-for-qt-development-on-macos-catalina/and more helpful:
https://forum.qt.io/topic/116526/set-up-mariadb-library-file-location-programmatically/57 -
Do not forget to properly clean before retrying your build as explained in the doc otherwise the cache will kick in and you'll stay in the same situation.