I need to connect MySQL with Qt
-
Start your app with QT_DEBUG_PLUGINS to see why the mysql driver is no loaded.
And please don't post screenshots but text.
-
Start your app with QT_DEBUG_PLUGINS to see why the mysql driver is no loaded.
And please don't post screenshots but text.
@Christian-Ehrlicher How to use QT_DEBUG_PLUGINS. I don;t know how to use it
-
@Christian-Ehrlicher How to use QT_DEBUG_PLUGINS. I don;t know how to use it
-
@Tuanhoc8 it's an environment variable as is explained in the documentation. Set it in the Run part of the Project panel.
-
When you start your application you should see a truck load of debugging messages.
-
@SGaist it display
`C:\Qt\5.15.2\mingw81_64\plugins\sqldrivers\qsqlmysql.dll': Shared library architecture i386 is not compatible with target architecture i386:x86-64.
It means i need to use mingw32 ? Is it rightYour Mysql plugin should be built with the same compiler (or binary compatible) as the Qt libraries you are using. You are building your application with 64-bit Qt MingW libraries so your Qt Mysql plugin should also be a 64-bit MingW DLL. That looks to be the case.
The Mysql runtime library that the Qt plugin loads must also be a 64-bit build. My money is on the Mysql runtime being 32-bit. It is possible you have more than one of these installed and the program is finding the 32-bit version first.
-
Your Mysql plugin should be built with the same compiler (or binary compatible) as the Qt libraries you are using. You are building your application with 64-bit Qt MingW libraries so your Qt Mysql plugin should also be a 64-bit MingW DLL. That looks to be the case.
The Mysql runtime library that the Qt plugin loads must also be a 64-bit build. My money is on the Mysql runtime being 32-bit. It is possible you have more than one of these installed and the program is finding the 32-bit version first.
-
@Tuanhoc8 if you want to use the 64bit plugin, yes.
-
@Tuanhoc8 if you want to use the 64bit plugin, yes.
@Christian-Ehrlicher Thanks you. I will try

