QMYSQL Driver not available in the QT 5.13.2 and QT 5.14
-
Hello I want to connect to MySQL database so I used the old way to connect to it in the old version as I have QT 5.11.1 the last version I used to connect to MySQL, now when I tried with a simple connection I got this
QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7 ERROR OpenDatabase: "Driver not loaded Driver not loaded"
in the past I got this error but I see QMYSQL and QMYSQL3 I just add the dll of libmysql and it works, now the driver not found in both versions, and when I go to the Plugin DLLs file I did not find the qsqlmysql.dll and qsqlmysqld.dll which make the driver load, so anywhere I can download those dlls to make it work on QT 5.13.2?
What I tried so far I installed QT 5.11.1 as the old version I have on my pc and try to use the qsqlmysql.dll and qsqlmysqld.dll but I got incompatible dll error, so I don't know what is the reason of not include those dlls in the main package, and if possible to find them compailed anywhere to download them direct.
Thanks in advance. -
This question was already asked many times here - there is a search function for this... The driver is not provieded anymore it the pre-compiled versions due to license issues. You have to compile it by yourself. See https://doc.qt.io/qt-5/sql-driver.html
-
This post helped me a lot beside the main docs:
https://forum.qt.io/topic/92626/cant-connect-to-mysql-database-qmysql-driver-not-loaded/20
Maybe it helps you too. ^^