How to Connect mysql database in Raspberry Pi 3
Solved
General and Desktop
-
Hello Friends
Currently I am working on Raspberry pi 3
i was install mysql
and try to established connectionmy code Is :
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL"); db.setHostName("127.0.0.1"); db.setPort(3306); db.setUserName("root"); db.setDatabaseName("Demo"); db.setPassword("Password");
outPut Is :
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITEplease Help To slove this Problem
-
Hi
I think you have to compile the Qt plugin also
https://forum.qt.io/topic/40672/how-to-create-the-plugin-of-mysql-for-qt
This must be done with the arms compiler for Pi and then copy the resulting files to it.https://forum.qt.io/topic/71972/how-to-add-qmysql-driver-for-raspberry-pi