Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Can we work with MySQL?

Can we work with MySQL?

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
6 Posts 4 Posters 2.3k Views 2 Watching
  • 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.
  • J Offline
    J Offline
    jdent
    wrote on last edited by
    #1

    Is there support in Qt SQL for MySql? I don't see a specific driver for this...

    Thanks

    Juan Dent

    B 1 Reply Last reply
    0
    • J jdent

      Is there support in Qt SQL for MySql? I don't see a specific driver for this...

      Thanks

      Juan Dent

      B Offline
      B Offline
      blaisesegbeaya
      wrote on last edited by
      #2

      @jdent The driver should be in <INSTALLED FOLDER>/PLUGINs/sqldrivers
      The Name should be something like: qsqlmysql4.dll at least for the QT 4.8x versions.
      If you do not found it, you need to build the QT driver.

      J 1 Reply Last reply
      0
      • J Offline
        J Offline
        jdent
        wrote on last edited by
        #3

        Ok, looking at that address in m y computer (Mac Pro), I see the following dynamic link libraries (which end in dylib in Apple's OS X system):

        libsqlite_debug.dylib
        libsqlite.dylib
        libsqlmysql_debug.dylib
        libsqlmysql.dylib
        libsqlodbc_debug.dylib
        libsqlodbc.dylib
        libsqlpsql_debug.dylib
        libsqlpsql.dylib

        So, it seems there is a driver for MySql!! But, the enumeration for DbmsType does not include MySQL???

        This seems contradictory..

        Any ideas?

        Juan

        1 Reply Last reply
        0
        • B blaisesegbeaya

          @jdent The driver should be in <INSTALLED FOLDER>/PLUGINs/sqldrivers
          The Name should be something like: qsqlmysql4.dll at least for the QT 4.8x versions.
          If you do not found it, you need to build the QT driver.

          J Offline
          J Offline
          jdent
          wrote on last edited by
          #4

          @blaisesegbeaya

          Where could I find detailed instructions as to how to create a QT driver - should that be necessary??

          Thanks
          Juan

          ? 1 Reply Last reply
          0
          • J jdent

            @blaisesegbeaya

            Where could I find detailed instructions as to how to create a QT driver - should that be necessary??

            Thanks
            Juan

            ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            @jdent Hi!

            There is no need to write your own MySQL driver. Qt has a plugin for MySQL since very long ago and it's stable and just works and everyone uses it. :-)

            Here is the list of all supported databases. I guess the MySQL plugin can also talk to MariaDB but I'm not sure about that.

            Are you using a precompiled Qt environment or have you compiled Qt youself? If you've built it yourself and you're now missing the MySQL plugin then this is either caused by missing dependencies (MySQL development headers) or misconfiguration during the build process.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi,

              The most likely situation: you have either MySQL installed through brew, MacPorts or even from the package on their website and it's not the same version nor the same path than the one used to build Qt.
              Run otool -L on libsqlmysql.dylib to see what's the status.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              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