I tried solving it by importing the plugin i did that the following way:

Configured with the following code:
configure -release -plugin-sql-mysql -I "C:\MySql\include" -L "C:\MySql\lib"
Qt Code:
  1. #include <QtPlugin>
  2.  
  3. Q_IMPORT_PLUGIN(qsqlmysql)
To copy to clipboard, switch view to plain text mode 

To the code

Made the .pro file with:
qmake -project "QT += sql" "QTPLUGIN += qsqlmysql"

And the when i run make i get the following error:
Qt Code:
  1. mingw32-make -f Makefile.Release
  2. mingw32-make[1]: Entering directory `C:/Qt/4.3.0/Projects/hello'
  3. g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
  4. oc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o "release\hello.exe" tmp\obj\re
  5. lease_shared\hello.o -L"c:\Qt\4.3.0\lib" -L"c:\Qt\4.3.0\lib" -lmingw32 -lqtmain
  6. -lQtSql4 -lQtGui4 -lQtCore4 -LC:/Qt/4.3.0/plugins/sqldrivers/ -lqsqlmysql4 -LC:
  7. \MySql\lib
  8. tmp\obj\release_shared\hello.o(.text+0x859):hello.cpp: undefined reference to `q
  9. t_plugin_instance_qsqlmysql()'
  10. collect2: ld returned 1 exit status
  11. mingw32-make[1]: *** [release\hello.exe] Error 1
  12. mingw32-make[1]: Leaving directory `C:/Qt/4.3.0/Projects/hello'
  13. mingw32-make: *** [release] Error 2
To copy to clipboard, switch view to plain text mode