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. Qt SQL qt6.4.1 and MySQL 8.0 TLS problems
Forum Updated to NodeBB v4.3 + New Features

Qt SQL qt6.4.1 and MySQL 8.0 TLS problems

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
8 Posts 3 Posters 1.5k 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.
  • N Offline
    N Offline
    Neptunus
    wrote on last edited by
    #1

    I have an MySQL Server 8.0, which supports connection with TLS>1.2. I use Qt 6.4.1 and I created an MySQL client. I am not able to connect with my server, I tried with another server which has MySQL 5.7 and it works perfectly. Can I resolve it? I didn't find option to set TLS in QSqlDatabase option. Thanks.

    I would like to find a solution for my problems. I searched it, without success.
    Thanks.

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      There is currently no solution for it except disabling ssl. See also https://bugreports.qt.io/browse/QTBUG-84797

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

      JonBJ 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        There is currently no solution for it except disabling ssl. See also https://bugreports.qt.io/browse/QTBUG-84797

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @Christian-Ehrlicher
        That bug report states

        For QMYSQL such options do not seem to exist thus connecting to 5.7.X MySQL servers is not possible. The problem does not happen when connecting to 8.X servers.

        But the OP reports the opposite

        I use Qt 6.4.1 and I created an MySQL client. I am not able to connect with my server, I tried with another server which has MySQL 5.7 and it works perfectly.

        ?

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          I would say a typo in the description from the OP. The ssl options are sadly diverged between MariaDB and MySQL and therefore the problems with ssl connections and newer MySQL servers.

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

          1 Reply Last reply
          0
          • N Offline
            N Offline
            Neptunus
            wrote on last edited by
            #5

            I have the problem with MySQL 8.0. The connection doesn't work.
            With MySQL 5.7, it works perfectly.
            With the option db.setConnectOptions("MYSQL_OPT_SSL_MODE=SSL_MODE_DISABLED"); I have this error:
            QMYSQLDriver::open: Illegal connect option value 'MYSQL_OPT_SSL_MODE=SSL_MODE_DISABLED'

            1 Reply Last reply
            0
            • N Offline
              N Offline
              Neptunus
              wrote on last edited by
              #6

              I have this error:
              "QSqlError("2026", "QMYSQL: Unable to connect", "SSL connection error: unknown error number")"

              if I disable ssl in MySQL server, it's Works!

              Christian EhrlicherC 1 Reply Last reply
              0
              • N Neptunus

                I have this error:
                "QSqlError("2026", "QMYSQL: Unable to connect", "SSL connection error: unknown error number")"

                if I disable ssl in MySQL server, it's Works!

                Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Neptunus said in Qt SQL qt6.4.1 and MySQL 8.0 TLS problems:

                if I disable ssl in MySQL server, it's Works!

                Yes, this is currently the only possible solution. Or add a patch similar to the one in the bug report.

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

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  Neptunus
                  wrote on last edited by
                  #8

                  Thanks for your 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