Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. A problem on MySQL driver installation.
QtWS25 Last Chance

A problem on MySQL driver installation.

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 2 Posters 1.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    foxyz
    wrote on last edited by
    #1

    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!

    I just know coding and coding

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      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));
      @

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • F Offline
        F Offline
        foxyz
        wrote on last edited by
        #3

        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)

        I just know coding and coding

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on last edited by
          #4

          [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?

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          1 Reply Last reply
          0
          • F Offline
            F Offline
            foxyz
            wrote on last edited by
            #5

            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.....

            I just know coding and coding

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved