Qt SQL qt6.4.1 and MySQL 8.0 TLS problems
-
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. -
There is currently no solution for it except disabling ssl. See also https://bugreports.qt.io/browse/QTBUG-84797
-
There is currently no solution for it except disabling ssl. See also https://bugreports.qt.io/browse/QTBUG-84797
@Christian-Ehrlicher
That bug report statesFor 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.
?
-
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.
-
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' -
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!
@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.