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. SSL connection error: unknown error number QMYSQL: Unable to connect

SSL connection error: unknown error number QMYSQL: Unable to connect

Scheduled Pinned Locked Moved Unsolved General and Desktop
mysqlsslssl error
6 Posts 3 Posters 4.1k 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.
  • K Offline
    K Offline
    koahnig
    wrote on 30 Oct 2018, 17:09 last edited by
    #1

    I am trying to open a mysql db somewher on an external server. The QMYSQL driver is loaded, but after the open statement for the db the error message is:
    "SSL connection error: unknown error number QMYSQL: Unable to connect"

    db name, user and password are correct. With these credentials and MySQL workbench I can open the DB without SSL.

    During trials and look-up in the documentation I have found

    db.setConnectOptions("SSL_KEY=client-key.pem;SSL_CERT=client-cert.pem;SSL_CA=ca-cert.pem;CLIENT_IGNORE_SPACE=1");
    

    which does not work, since I have no key or certificate. I have tried to reset the connect options without success with

    db.setConnectOptions();
    

    Does anybody have an idea what to check and/or how to open the db connection without SSL?

    Vote the answer(s) that helped you to solve your issue(s)

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 30 Oct 2018, 21:58 last edited by
      #2

      Hi,

      What address are you using to connect to your server instance ?

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

      K 1 Reply Last reply 31 Oct 2018, 07:27
      0
      • S SGaist
        30 Oct 2018, 21:58

        Hi,

        What address are you using to connect to your server instance ?

        K Offline
        K Offline
        koahnig
        wrote on 31 Oct 2018, 07:27 last edited by
        #3

        @SGaist

        It is simply the ipv4 address on a webhosting without any additions. Basically I had that before the identical way and it did work. Never thought about SSL for this.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 1 Nov 2018, 22:58 last edited by
          #4

          Are you sure that workbench is not using OpenSSL ?
          Which version of it do you want ?

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

          K 1 Reply Last reply 2 Nov 2018, 10:36
          0
          • S SGaist
            1 Nov 2018, 22:58

            Are you sure that workbench is not using OpenSSL ?
            Which version of it do you want ?

            K Offline
            K Offline
            koahnig
            wrote on 2 Nov 2018, 10:36 last edited by
            #5

            @SGaist

            I have OpenSSL recently installed, but I am stating explicitly "no" for SSL connection option in MySql workbench.
            The connection give a warning, but this relates to the workbench version which seem to be higher than the actual MySql install at the web domain. No mention of SSL at all there.

            Since I have not really used OpenSSL I am lost on those parameters as used above. They are from the Qt document example and potentially completely wrong

            Vote the answer(s) that helped you to solve your issue(s)

            A 1 Reply Last reply 26 Apr 2024, 06:58
            0
            • K koahnig
              2 Nov 2018, 10:36

              @SGaist

              I have OpenSSL recently installed, but I am stating explicitly "no" for SSL connection option in MySql workbench.
              The connection give a warning, but this relates to the workbench version which seem to be higher than the actual MySql install at the web domain. No mention of SSL at all there.

              Since I have not really used OpenSSL I am lost on those parameters as used above. They are from the Qt document example and potentially completely wrong

              A Offline
              A Offline
              Aditya20
              wrote on 26 Apr 2024, 06:58 last edited by
              #6

              @koahnig Try using skip_ssl in my.ini file located in MySQL installer path. This worked out for me.

              [mysqld]

              skip_ssl

              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