Skip to content

Commit 3b89dcb

Browse files
author
stoeckerb
committed
init branch Qt 5.15.2
1 parent 3e79f4d commit 3b89dcb

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
1-
Since the Qt Company currently doesn't give a crap on providing qsqlmysql.dll in binary form, you have to build it on your own. Here is a build for various Qt versions. Download precompiled qsqlmysql.dll from https://github.com/thecodemonkey86/qt_mysql_driver/releases
1+
Typical symptom when trying to connect to MySQL / MariaDB using Qt but without the necessary plugin is the runtime error
2+
3+
4+
<pre><code>
5+
QSqlDatabase: QMYSQL driver not loaded
6+
QSqlDatabase: available drivers: QMYSQL
7+
</code></pre>
8+
9+
10+
Since the Qt Company currently doesn't give a crap on providing qsqlmysql.dll in binary form, you have to build it on your own, which can be a pain. Here is a build for various Qt versions. Get precompiled qsqlmysql.dll from <a href="https://github.com/thecodemonkey86/qt_mysql_driver/releases">releases</a>
11+
212

313
Deployment
414

5-
1) in application subdirectory "sqldrivers" qsqlmysql.dll (Release) / qsqlmysqld.dll (Debug)
6-
2) the MySQL library itself libmysql.dll
15+
1) put qsqlmysql.dll (if release build) / qsqlmysqld.dll (if debug build) in application subdirectory "sqldrivers"
16+
2) put libmysql.dll (the MySQL library itself) in your application dir
17+
18+
719

8-
20+
If you want to use this repository for compiling it yourself:
921
Building hints
22+
- Unlike the original .pro file this project can be built in Qt Creator, the source code is however unchanged
1023
- See branches by Qt version for source code
11-
- Make sure you link against the official MySQL C Connector v6.1 (not C++): https://downloads.mysql.com/archives/c-c/?version=6.1.2&amp;os=src
24+
- Make sure you link against the official MySQL C Connector v6.1/v8.0 (not C++): https://downloads.mysql.com/archives/c-c/?version=6.1.11&amp;os=src / https://dev.mysql.com/downloads/mysql/5.5.html?os=3&version=5
1225
- The .pro file from this repository by default expects the contents of the zip file from mysql.com to be in the same base directory as the sql driver project
13-
e.g. D:\qt\src\sqldrivers is the sql driver project dir and D:\qt\src\mysql-connector-c-6.1.2-win32 is the MySQL connector library directory, so that there are D:\qt\src\mysql-connector-c-6.1.2-win32\include and \lib subdirs
26+
e.g. D:\qt\src\sqldrivers is the sql driver project dir and D:\qt\src\mysql-connector-c-x.y.z-winx64 is the MySQL connector library directory, so that there are D:\qt\src\mysql-connector-c-x.y.z-winx64\include and \lib subdirs

0 commit comments

Comments
 (0)