Hi,

I am trying to connect MySql database using an SSL connection. Connecting without SSL works fine.

I created a database and a user with REQUIRE SSL option. When I try to connect I get: "SSL connection error QMYSQL: Unable to connect".

I am using Qt 4.7 64 bit on Ubuntu 10.04

The code looks like the following:

Qt Code:
  1. QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL", m_connName);
  2. if (!db.isValid())
  3. {
  4. return;
  5. }
  6. db.setDatabaseName(dbName);
  7. db.setHostName("localhost");
  8. db.setPort(3306);
  9. db.setConnectOptions("CLIENT_SSL=1;CLIENT_IGNORE_SPACE=1");
  10. if (!db.open(userName, password))
  11. {
  12. qDebug()<<db.lastError().text();
  13. return;
  14. }
To copy to clipboard, switch view to plain text mode 

Was anyone able to work using this setup before?

Thank you