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. MySql driver for Qt 5.1 on Windows
Qt 6.11 is out! See what's new in the release blog

MySql driver for Qt 5.1 on Windows

Scheduled Pinned Locked Moved Installation and Deployment
17 Posts 3 Posters 5.0k Views 1 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.
  • G Offline
    G Offline
    Giperboloid
    wrote on last edited by
    #1

    I have read a lot of posts but a lot of them concern Linux, I tried to find some files to compile them in dll but I don't now where to find them on my system. Need help, guys.

    1 Reply Last reply
    0
    • E Offline
      E Offline
      Ever
      wrote on last edited by
      #2

      Hello Giperboloid,

      I assume that you have Windows OS, right?

      The roots of education are bitter, but the fruit is sweet.

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

        Hi and welcome to devnet,

        If you don't find files to compile it generally means that you don't have the sources installed.

        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
        • E Offline
          E Offline
          Ever
          wrote on last edited by
          #4

          You can install QT 5.2 MinGW, MySql driver is there and don't need to be compiled.

          The roots of education are bitter, but the fruit is sweet.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            Giperboloid
            wrote on last edited by
            #5

            [quote author="Ever" date="1387741182"]Hello Giperboloid,

            I assume that you have Windows OS, right?[/quote]

            Yepp, I have Windows.
            [quote author="Ever" date="1387744574"]You can install QT 5.2 MinGW, MySql driver is there and don't need to be compiled.[/quote]

            If it's true today I will have good day ;)

            1 Reply Last reply
            0
            • G Offline
              G Offline
              Giperboloid
              wrote on last edited by
              #6

              [quote author="SGaist" date="1387744319"]Hi and welcome to devnet,

              If you don't find files to compile it generally means that you don't have the sources installed.[/quote]

              So where I can find these source files and will installation of Qt 5.2 solve all my problems with mysql drivers?

              1 Reply Last reply
              0
              • E Offline
                E Offline
                Ever
                wrote on last edited by
                #7

                Here you can download
                "Qt 5.2.0 for Windows 32-bit MinGW 4.8, OpenGL":http://download.qt-project.org/official_releases/qt/5.2/5.2.0/qt-windows-opensource-5.2.0-mingw48_opengl-x86-offline.exe

                I suggest you that you remove previous installation of Qt by running MaintenanceTool.exe

                The roots of education are bitter, but the fruit is sweet.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  Giperboloid
                  wrote on last edited by
                  #8

                  [quote author="Ever" date="1387795692"]Here you can download
                  "Qt 5.2.0 for Windows 32-bit MinGW 4.8, OpenGL":http://download.qt-project.org/official_releases/qt/5.2/5.2.0/qt-windows-opensource-5.2.0-mingw48_opengl-x86-offline.exe

                  I suggest you that you remove previous installation of Qt by running MaintenanceTool.exe[/quote]

                  What do you mean? I didn't use this maintenance tool and even didn't remove my Qt 5.1.

                  1 Reply Last reply
                  0
                  • E Offline
                    E Offline
                    Ever
                    wrote on last edited by
                    #9

                    It is optional.

                    The roots of education are bitter, but the fruit is sweet.

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      Giperboloid
                      wrote on last edited by
                      #10

                      Ok, I just have installed Qt 5.2 with all sources. I have such connection:
                      @QSqlDatabase lib = QSqlDatabase::addDatabase("QMYSQL");@
                      and the output is:

                      @QSqlDatabase: QMYSQL driver not loaded
                      QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7@

                      very intresting thing: driver is available but not loaded.

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

                        Do you have MySql installed ? If so, is the folder containing the MySql dlls in your PATH environment variable ?

                        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
                        • G Offline
                          G Offline
                          Giperboloid
                          wrote on last edited by
                          #12

                          Emm... It's Windows, about what PATH you are talking?

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

                            Indeed, the PATH environment variable that is used to find the executables/dlls on one's system

                            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
                            • G Offline
                              G Offline
                              Giperboloid
                              wrote on last edited by
                              #14

                              Ok, how I can check this variable?

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

                                Look in the run panel from Qt Creator

                                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
                                • E Offline
                                  E Offline
                                  Ever
                                  wrote on last edited by
                                  #16

                                  bq. very intresting thing: driver is available but not loaded

                                  You can copy file libmysql.dll from C:\Program Files\MySQL\MySQL Server 5.6\lib (absolute path on my computer), to debug and/or release folder of our project.

                                  The roots of education are bitter, but the fruit is sweet.

                                  1 Reply Last reply
                                  0
                                  • G Offline
                                    G Offline
                                    Giperboloid
                                    wrote on last edited by
                                    #17

                                    Sorry, nothing haven't help me so I decided to choose SQLite. Thanks for answers.

                                    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