How to create the plugin of MYSQL for Qt

Hi, having just solved the problem, i want to share how i managed to do it, and i have to admit that it was really painfull ^^

Download : the mingw utilities here, and MySQL community server from the official site.

Once you download the mingw utilities extract it, and then go to the bin directory, and copy everything to the bin directory of Qt, I copied it into : C:\Qt\Qt5.2.0\5.2.0\mingw48_32\bin, find a similar reference, once you do, install MySQL in C:\, once it's done, name the directory MySQL to simplify your life for the coming.

Now that you have everything set, open the Qt DOS prompt it should be installed, I have Win8 so i have a link to it, at the home screen.

Now type : cd C:\Qt\Qt5.2.0\5.2.0\Src\qtbase, then type : configure.exe -debug-and-release -platform win32-g++ -qt-sql-mysql -l mysql -I C:\MySQL\MySQL51\include -L C:\MySQL\MySQL51\lib\opt
you will have to wait for a long time, so go drink something. Then type mingw32-make sub-src.

Maria dBase is free, and is mostly compatible with Mysql, and is shipped with most Linux distribution, why can't this be included in the box standard Qt, it would save many a lot of frustration, as we have to do-it every time we 'upgrade', because of license issues. For the guy who really needs MySql could do-it this , but for the other 98% a Maria driver should be fine. Does any one knows why Maria driver could not be shipped with Qt?

Like written in the post, these instructions are for Windows. Linux and OS X are far less problematic. On OS X install mysql through e.g. macports with sudo port install mysql56 and on Linux, install the mysql dev packages.

I recently ran into an issue with mysql (mariadb) in a linux environment - apparently, the 5.3.1 release ties to an older version of mysql that my system no longer supports (apparently, qt-5.3.1-release wants version .16, while my system uses .18). If you have this problem, an ldd of /path/to/qt5/plugins/sqldrivers/libqsqlmysql.so should show that it can't find your mysql libs. To fix this, go into the source directory at qtbase/src/plugins/sqldrivers/mysql, run qmake (specifically for 5.3.1, not the system qmake), and then make install.

Even today Qt doesn't have a MySql proper plugin delivered with? any way.. thanks for this great job... that save me a lot of trouble I wish to do something similar with HeidiSql and this was a good start point.. Thanks again

Creating qmake...
mingw32-make: Nothing to be done for 'first'.
Running configuration tests...
g++: error: CreateProcess: No such file or directory
mingw32-make: *** [arch.o] Error 1
Could not find output file: No such file or directory
WARNING: The DirectX SDK could not be detected:
There is no Direct X SDK installed or the environment variable "DXSDK_DIR" is
not set.
Disabling the ANGLE backend.

WARNING: Using OpenGL ES 2.0 without ANGLE.
Specify -opengl desktop to use Open GL.
The build will most likely fail.

This is the first time for me with C++ and QT so for me it's all new and I do not know what are the requirements needed to achieve my goal.
I want to make a windows application that keep some signal from a RFID antenna attached to notebook from serial and store data in a mysql database.
To start I want only to connect to mysql database and read a table data.

I m sorry for not being able to reply ^^ cause i ve moved to the web development world for a moment, thus i have forgotten about this post! anyway the instructions i did were for Windows, but i never tried the other platforms tough :/ sorry! @massum, and a big thanks to @SGaist ^^

reimp.exe is available from mingw-utils-0.3, but i am totally frustrated now due to failure occured multiple times.
I need help urgently, since project deadline is near. Will anyone please upload libqsqlmysql.a and qsqlmysql.dll on any ftp site or mail me these as an attachment. i followed all the given steps, but failed to compile.
my mail id is: technosujit25@gmail.com
plz guys,help me!!!!!
I seriously need ur help in order to complete this project.