A problem on MySQL driver installation.



  • Hi,
    I'm trying to install a plugin MySQL driver on my laptop, It's compiled successfully, but does't work.
    I have already built the release and debug library files and put them in the correct directory. next is the details:
    platform: Qt4.8.4,win7-x86-64bit, MySQL-5.1.68 C_API and header files.VS2010
    Four files in folder D:\Qt\4.8.4\plugins\sqldrivers

    qsqlmysql4.dll qsqlmysql4.lib qsqlmysqld4.dll qsqlmysqld4.lib
    But it QSqlDatabase::drivers() is still no "QMYSQL" exist.

    any clues? thanks!



  • Hi,

    are you sure the PATH where plugins are located is correct?
    Try to print Default Location for Database Plugins
    @
    QString pluginsPath = QLibraryInfo::location (QLibraryInfo::PluginsPath);
    qDebug (qPrintable(pluginsPath));
    @



  • Thank you!,I got this :QLibraryInfo::location (QLibraryInfo::PluginsPath) = "D:\Qt\4.8.4\plugins"
    This location is correct. Also I add it to PATH. Someone said a file libmysql.dll should be copied to
    system directory. But my mysql installation doesn't contain this file,( only a file libmysql.lib exists in path of /MySQL51/lib/opt)



  • [quote author="foxyz" date="1367886370"]Thank you!,I got this :QLibraryInfo::location (QLibraryInfo::PluginsPath) = "D:\Qt\4.8.4\plugins"
    This location is correct. Also I add it to PATH. Someone said a file libmysql.dll should be copied to
    system directory. But my mysql installation doesn't contain this file,( only a file libmysql.lib exists in path of /MySQL51/lib/opt)[/quote]

    Hi,
    what you saying means MySQL client was only statically linked. Are you sure your installation was successfully performed?



  • Another choice, I built it successfully on linux virtual machine ,and now it works well!

    Thank you mcosta!! Anyway, Maybe I should say bye-bye to my windows OS.....


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.