Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QMYSQL with SSL on Android
QtWS25 Last Chance

QMYSQL with SSL on Android

Scheduled Pinned Locked Moved Mobile and Embedded
qmysqlsslandroid
5 Posts 2 Posters 2.3k 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.
  • L Offline
    L Offline
    Leonardo
    wrote on last edited by
    #1

    Hi. I have a mobile application which connects to a MySQL server. I would like to have the connection encrypted, so I'm doing as the documentation says:

    conn.setConnectOptions("CLIENT_SSL=1;CLIENT_IGNORE_SPACE=1");
    

    The connections is established, but I can only perform one query. I always get a "Segmentation fault" error while performing a second query using the same connection. It works fine if I remove the SSL flag, and the same code also works fine on Windows, with or without SSL.

    I'm using Qt 5.5.0 and libmysqlclient 6.1.5. At first I would say it's something related to the mysql client lib, but the fact that the same code works on Windows makes me wonder...

    Has anyone already successfully used MySQL+SSL on Android? I'm not sure how to address this issue.

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

      Hi,

      Just a wild guess, do you have OpenSSL build for Android ?

      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
      • L Offline
        L Offline
        Leonardo
        wrote on last edited by
        #3

        Hi. The libmysqlclient has an embedded ssl library (yassl). I went with it, but it's possible to use openssl... Maybe I should give it a try. I'll post the results here.

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

          Where did you get that libmysqlclient ?

          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
          • L Offline
            L Offline
            Leonardo
            wrote on last edited by
            #5

            It's been some time now. I don't remember exactly, but I think it was most likely from here:

            ftp://linorg.usp.br/mysql/Downloads/Connector-C/mysql-connector-c-6.1.5-src.zip

            It's one of the official mirrors.

            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