Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. MySQL/MariaDB connector driver building Qt 6 Windows 10
Forum Updated to NodeBB v4.3 + New Features

MySQL/MariaDB connector driver building Qt 6 Windows 10

Scheduled Pinned Locked Moved General and Desktop
25 Posts 3 Posters 3.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.
  • P paokaras98

    @Christian-Ehrlicher said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

    @paokaras98 said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

    Do you have any command in your mind?

    No but when PyQt is compiled against e.g. Qt6.3 your plugin must also be compiled with Qt 6.3 (or lower).

    I tried to copy the generated qsqlmysql.dll to the PyQt6 plugins/sqldrivers folder and then when I run my Python application, NOW MariaDB and MYSQL drivers are available BUT NOT loaded :(

    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QMARIADB QMYSQL QODBC QPSQL
    ['QSQLITE', 'QMARIADB', 'QMYSQL', 'QODBC', 'QPSQL']
    

    I think that we are close to the solution, arent we?

    Christian EhrlicherC Online
    Christian EhrlicherC Online
    Christian Ehrlicher
    Lifetime Qt Champion
    wrote on last edited by
    #11

    You have to make sure all needed depent dlls are in the PATH.

    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
    Visit the Qt Academy at https://academy.qt.io/catalog

    P 1 Reply Last reply
    1
    • Christian EhrlicherC Christian Ehrlicher

      You have to make sure all needed depent dlls are in the PATH.

      P Offline
      P Offline
      paokaras98
      wrote on last edited by
      #12

      @Christian-Ehrlicher said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

      You have to make sure all needed depent dlls are in the PATH.

      And how can I identify which dlls are depent? I know how to check the PATH variables

      Christian EhrlicherC 1 Reply Last reply
      0
      • P paokaras98

        @Christian-Ehrlicher said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

        You have to make sure all needed depent dlls are in the PATH.

        And how can I identify which dlls are depent? I know how to check the PATH variables

        Christian EhrlicherC Online
        Christian EhrlicherC Online
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #13

        E.g. with DependencyWalker or it's successor Dependencies. You need at least the mysql or mariadb dlls

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        P 1 Reply Last reply
        1
        • Christian EhrlicherC Christian Ehrlicher

          E.g. with DependencyWalker or it's successor Dependencies. You need at least the mysql or mariadb dlls

          P Offline
          P Offline
          paokaras98
          wrote on last edited by
          #14

          @Christian-Ehrlicher said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

          E.g. with DependencyWalker or it's successor Dependencies. You need at least the mysql or mariadb dlls

          I have each one in their specific connectors. Apart from there should I copy these dlls, into another folder?

          Christian EhrlicherC 1 Reply Last reply
          0
          • P paokaras98

            @Christian-Ehrlicher said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

            E.g. with DependencyWalker or it's successor Dependencies. You need at least the mysql or mariadb dlls

            I have each one in their specific connectors. Apart from there should I copy these dlls, into another folder?

            Christian EhrlicherC Online
            Christian EhrlicherC Online
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #15

            @paokaras98 said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

            Apart from there should I copy these dlls, into another folder?

            You have to make sure all needed depent dlls are in the PATH.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            P 1 Reply Last reply
            0
            • Christian EhrlicherC Christian Ehrlicher

              @paokaras98 said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

              Apart from there should I copy these dlls, into another folder?

              You have to make sure all needed depent dlls are in the PATH.

              P Offline
              P Offline
              paokaras98
              wrote on last edited by
              #16

              @Christian-Ehrlicher said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

              @paokaras98 said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

              Apart from there should I copy these dlls, into another folder?

              You have to make sure all needed depent dlls are in the PATH.

              I used the prebuilt .dlls from here https://github.com/thecodemonkey86/qt_mysql_driver
              And then followed without any error the commands forMSVC2019, nothing worked. In the end the Driver is available but not loaded.
              As you can see in the following images, I have set the libmariadb.lib in enviroment variables and /lib and /include subdirs into PATH.
              Finally the dependecies for qsqlmysql.dll are fulfilled since I have compiled with MSVC
              path.png

              marialib.png
              reko.png
              What is the next step :p. Iam feeling silly since I follow all the steps and stills doesnt work

              1 Reply Last reply
              0
              • P Offline
                P Offline
                paokaras98
                wrote on last edited by
                #17

                YESSSSSSSSSSSSSSSSS FINALLY WORKED. I copied libmaria, qmysql, qmysqld dlls into

                C:\Users\panos\AppData\Roaming\Python\Python310\site-packages\PyQt6\Qt6\plugins\sqldrivers
                
                jsulmJ 1 Reply Last reply
                0
                • P paokaras98

                  YESSSSSSSSSSSSSSSSS FINALLY WORKED. I copied libmaria, qmysql, qmysqld dlls into

                  C:\Users\panos\AppData\Roaming\Python\Python310\site-packages\PyQt6\Qt6\plugins\sqldrivers
                  
                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #18

                  @paokaras98 said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                  qmysqld

                  This one is the debug version and I don't think you need it as you're probably not going to debug it.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  P 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @paokaras98 said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                    qmysqld

                    This one is the debug version and I don't think you need it as you're probably not going to debug it.

                    P Offline
                    P Offline
                    paokaras98
                    wrote on last edited by
                    #19

                    @jsulm said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                    @paokaras98 said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                    qmysqld

                    This one is the debug version and I don't think you need it as you're probably not going to debug it.

                    I thought that mysqld.dll has to do with mysqld.exe, because now Iam wondering, how my database could wok in another computer, where no mariadb server etc. files are installed, so we would like to have the mysqld.exe ''representative''

                    jsulmJ 1 Reply Last reply
                    0
                    • P paokaras98

                      @jsulm said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                      @paokaras98 said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                      qmysqld

                      This one is the debug version and I don't think you need it as you're probably not going to debug it.

                      I thought that mysqld.dll has to do with mysqld.exe, because now Iam wondering, how my database could wok in another computer, where no mariadb server etc. files are installed, so we would like to have the mysqld.exe ''representative''

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #20

                      @paokaras98 said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                      mysqld.exe

                      What is this?
                      Clients do not need the server stuff, just deploy client libraries together with your application.

                      And to precise what I mentioned before:

                      • qmysql.dll - this is the release build of the plug-in
                      • qmysqld - this is debug build of the plug-in
                        There is really no need to deploy release AND debug build of the plug-ins/libraries.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      P 1 Reply Last reply
                      1
                      • jsulmJ jsulm

                        @paokaras98 said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                        mysqld.exe

                        What is this?
                        Clients do not need the server stuff, just deploy client libraries together with your application.

                        And to precise what I mentioned before:

                        • qmysql.dll - this is the release build of the plug-in
                        • qmysqld - this is debug build of the plug-in
                          There is really no need to deploy release AND debug build of the plug-ins/libraries.
                        P Offline
                        P Offline
                        paokaras98
                        wrote on last edited by
                        #21

                        @jsulm said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                        @paokaras98 said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                        mysqld.exe

                        What is this?
                        Clients do not need the server stuff, just deploy client libraries together with your application.

                        And to precise what I mentioned before:

                        • qmysql.dll - this is the release build of the plug-in
                        • qmysqld - this is debug build of the plug-in
                          There is really no need to deploy release AND debug build of the plug-ins/libraries.

                        I understand your point, but what if I want to distribute my app to another computer and this computer does not have any db server installed. Could the database connect and work successfully only with client libraries even if none dbms server software is installed?

                        jsulmJ 1 Reply Last reply
                        0
                        • P paokaras98

                          @jsulm said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                          @paokaras98 said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                          mysqld.exe

                          What is this?
                          Clients do not need the server stuff, just deploy client libraries together with your application.

                          And to precise what I mentioned before:

                          • qmysql.dll - this is the release build of the plug-in
                          • qmysqld - this is debug build of the plug-in
                            There is really no need to deploy release AND debug build of the plug-ins/libraries.

                          I understand your point, but what if I want to distribute my app to another computer and this computer does not have any db server installed. Could the database connect and work successfully only with client libraries even if none dbms server software is installed?

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #22

                          @paokaras98 Well, of course there should be a server reachable from the client, so client can connect to it. But a client application should not distribute the server.
                          The client itself only needs client libraries to connect to a server.

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          P 1 Reply Last reply
                          0
                          • jsulmJ jsulm

                            @paokaras98 Well, of course there should be a server reachable from the client, so client can connect to it. But a client application should not distribute the server.
                            The client itself only needs client libraries to connect to a server.

                            P Offline
                            P Offline
                            paokaras98
                            wrote on last edited by paokaras98
                            #23

                            @jsulm said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                            @paokaras98 Well, of course there should be a server reachable from the client, so client can connect to it. But a client application should not distribute the server.
                            The client itself only needs client libraries to connect to a server.

                            Ok I got your point. However, suppose I have a customer to sell my software and this customer does not want to mess up with installations. He wants only an all-in-one installer to install the app and the dependencies(in my case the dbms server). So the dbms server .msi should be somehow included to my final installer and executed... am I right?.

                            jsulmJ P 2 Replies Last reply
                            0
                            • P paokaras98

                              @jsulm said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                              @paokaras98 Well, of course there should be a server reachable from the client, so client can connect to it. But a client application should not distribute the server.
                              The client itself only needs client libraries to connect to a server.

                              Ok I got your point. However, suppose I have a customer to sell my software and this customer does not want to mess up with installations. He wants only an all-in-one installer to install the app and the dependencies(in my case the dbms server). So the dbms server .msi should be somehow included to my final installer and executed... am I right?.

                              jsulmJ Offline
                              jsulmJ Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on last edited by
                              #24

                              @paokaras98 said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                              So the dbms server .msi should be somehow included to my final installer and executed... am I right?

                              Yes, but this has nothing to do with your client application.

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              1
                              • P paokaras98

                                @jsulm said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                                @paokaras98 Well, of course there should be a server reachable from the client, so client can connect to it. But a client application should not distribute the server.
                                The client itself only needs client libraries to connect to a server.

                                Ok I got your point. However, suppose I have a customer to sell my software and this customer does not want to mess up with installations. He wants only an all-in-one installer to install the app and the dependencies(in my case the dbms server). So the dbms server .msi should be somehow included to my final installer and executed... am I right?.

                                P Offline
                                P Offline
                                paokaras98
                                wrote on last edited by
                                #25

                                @paokaras98 said in MySQL/MariaDB connector driver building Qt 6 Windows 10:

                                Ok I got your point. However, suppose I have a customer to sell my software and this customer does not want to mess up with installations. He wants only an all-in-one installer to install the app and the dependencies(in my case the dbms server). So the dbms server .msi should be somehow included to my final installer and executed... am I right?.

                                Thank your for your clarification. I will make my research now

                                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