QMYSQL Driver not loaded
-
I've installed Qt5.6.0 just now and I'm getting the error when trying to connect to the database. my code is very simple just trying to test to see if I can connect to the database I've set up. It's a MariaDB database. How can I fix this?
This is What I get:
QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7 "Driver not loaded Driver not loaded"my code is:
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL"); db.setHostName("192.168.43.252"); db.setDatabaseName("readers"); db.setUserName("moki"); db.setPassword("mapra"); if(!db.open()) qDebug() << db.lastError().text(); -
You have already compiled the driver?
Download from here: https://dev.mysql.com/downloads/connector/cpp/ and follow the instruccions:
http://doc.qt.io/qt-4.8/sql-driver.htmlYou need a sqldriver folder with the plugin under your run directory
-
You have already compiled the driver?
Download from here: https://dev.mysql.com/downloads/connector/cpp/ and follow the instruccions:
http://doc.qt.io/qt-4.8/sql-driver.htmlYou need a sqldriver folder with the plugin under your run directory
-
@morkia in Linux, if you install libmysqlcppconn, doesn't need compile the plugin.
Try it -
@morkia in Linux, if you install libmysqlcppconn, doesn't need compile the plugin.
Try it