首先来自这位国外大神的帮助, 同时我最希望我的这篇博客能够帮助一些朋友解决这个问题,我也是纠结了好久,搞得好烦,非常能理解那种心情。。。。网上的教程都是很老的版本,没有正确的教程,还是谷歌好,在国外找到了,还好该博客的英文不是很复杂啊。。。。我这篇主要写Windows, Linux下比较容易,大同小异,网上的教程也挺多。 Qt5.4是自带驱动的, QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL QMYSQL3 QODBC 等等,说明Qt是自带的。但是为什么又出现 not load 呢,是因为该驱动所满足的依赖性,不满足,故要重新编译 工具:Qt5.4(Mingw49132)以及源码, Mysql5.5.30-win32.mis Qt5.4(Mingw49132)离线安装包,Qt5.4(Mingw49132)源码 Mysql5.5.30-win32.mis 不建议使用Mysql5.5以上版本,目前5.5以上只有5.6, 因为5.6版本不能自定义 MysqlServer 的安装位置, 而安装位置 必须是没有空格的.虽然5.6能够自定义文件夹,但文件夹下面的文件夹是有空格的,5.5可以完全自定义 1.
I was struggling to find solution for this. Finally it worked for me so here I am going to share how I made it work.
However I can’t guarantee it will work for all. Note:- My system: 32 bit Step 1:- Download (It contains the required dlls). Step 2:- unzipp the donwloaded folder. You should find these dll files inside:-. GdiPlus.dll. libeay32.dll. libiconv.dll.
libintl.dll. libpq.dll Step 3:- Copy these 5 dll files into the sql driver folder of the QT installation folder.
![Qmysql Qmysql](http://2.bp.blogspot.com/-YRk_A2f7XDw/TnumYVnwQaI/AAAAAAAAAJ4/x60Q_YFcjqI/s1600/Synaptic+Qt+MYSQL+Driver+Install.png)
For me the path is- C: Qt Qt5.5.1 5.5 mingw49232 plugins sqldrivers Step 4:-Try running the application in QT. It should work. If it is not working copy the above path to the ENVIRONMENTAL VARIABLE.and try again. Hint:- These files may differ for your system so you can manually search these files in the C drive search bar then follow the same rule.
Ii libqt4-sql-sqlite 4:4.8.1-0ubuntu4.8 Qt 4 SQLite 3 database driver ii libsqlite3-0 3.7.9-2ubuntu1.1 SQLite 3 shared library ii libsqlite3-dev 3.7.9-2ubuntu1.1 SQLite 3 development files. I'm experiencing the same problem that happens to anybody that is not expert too much expert in QT setup and wants to use QMYSQL plugin. QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7. QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7.