Unsolved QSqlDatabase: QMYSQL driver not loaded - Ubuntu
-
0
down vote
favoriteI'm using Qt5.10.0 and try to connect to MySQL database in Linux platform. I got an error like below...
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7I searched a lot to fix this error. But unable to fix this. Please help me with this and suggest what should I do?
-
@Gangani-Chamika
Did youapt-get libqt5-sql-mysql
? Or however you are choosing to install stuff. -
Hi
Its important to understand that the MySQL included with Qt do not
include the actual "drivers" for the database system.
Its a wrapper that will load the system installed "drivers" and you
must install those yourself as @JonB explains.There are many post on forum about using MySql, however this i find paticular
informative when using linux.
http://adamcavendish.is-programmer.com/posts/40431.html -
Hi,please if you solve this problem,share with us...Thanks
-
@JulioMARIE
The OP is not going to respond, as he will have disappeared into the Blue Void :)However, if you have the same problem as him, you too will need to:
Did you
apt-get libqt5-sql-mysql
? Or however you are choosing to install stuff.