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. Connecting to MySQL Server using SSL (AWS RDS)
Forum Update on Monday, May 27th 2025

Connecting to MySQL Server using SSL (AWS RDS)

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.4k 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.
  • S Offline
    S Offline
    sathhin
    wrote on 8 Jun 2016, 21:35 last edited by sathhin 6 Aug 2016, 21:36
    #1

    Hey all,
    First time posting!

    Having a bit of trouble using an SSL connection to a MySQL server. AFAIK I have all the prerequisites installed such as, MySQL Connector and OpenSSL. Since I'm using AWS and they only provide a CA file, I have used the code below;

    Db = QSqlDatabase::addDatabase("QMYSQL");
    Db.setConnectOptions("SSL_CA=rds.pem");
     
    Db.setDatabaseName(DBName);
    Db.setHostName(DBAddress);
    Db.setUserName(DBUserName);
    Db.setPassword(DBPassword);
     
    Connected = Db.open();
    

    There's plenty of information out there on opening an SSL connection, there's even a nice example in the documentation of QSqlDatabase. The issue I'm having is that I can't find much information regarding the error I'm getting.

    QMYSQLDriver::open: Illegal connect option value 'SSL_CA=rds.pem'
    

    I know I'm doing something wrong, just can't figure out what. Do I need to rebuild the MySQL libraries with SSL support or does the Qt binaries already come with that enabled?

    I'm on Windows 10 using QT 5.5.

    My apologies if I've missed something obvious.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 9 Jun 2016, 20:47 last edited by
      #2

      Hi and welcome to devnet,

      The support for that option as been added to Qt 5.6. You should update to either 5.6.1 (just released) or you can also consider 5.7RC.

      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

      2/2

      9 Jun 2016, 20:47

      • Login

      • Login or register to search.
      2 out of 2
      • First post
        2/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved