QSqlDatabase: QMYSQL driver not loaded
-
Hi there, I'm trying to use MySQL in my application, but for some reason the driver isn't being loaded. Right underneath that error I also get this: "QSqlDatabase: available drivers: QSQLITE, QMYSQL, QMYSQL3, QODBC, QODBC3, QPSQL, QPSQL7". Obviously it can find the driver, but it can't load it. I have MySQL loaded onto my computer and I'm just trying to connect to a test database. I have my path set to the bin folder where libmysql.dll is, but it still refuses to connect, even though it still builds. If anyone could shed some light on this problem I would be really grateful.
Thanks!
P.S: I'm using Windows 8.1 with MinGW 4.8.2 as the compiler
-
Hi and welcome to devnet,
Can you check what error you get from QSqlDatabase ?
-
I get Driver not loaded
-
Where did you set the PATH environment variable ?