<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MariaDB &#x2F; QMySqlDriver connection without SSL got 2026 error]]></title><description><![CDATA[<p dir="auto"><strong>My problem:</strong></p>
<p dir="auto">A MariaDB-Server is running in a LAMPP-Installation<br />
It runs by default without SSL!</p>
<p dir="auto">A Qt-Application (both 5.15.2 and 6.10.1) with loaded QMARIADB-Driver tried to open a connection to the server and stopped with this error message:</p>
<pre><code>QSqlError("2026", "QMYSQL: Unable to connect", "TLS/SSL error: SSL is required, but the server does not support it")
</code></pre>
<p dir="auto">My aim is to connect locally WITHOUT SSL!<br />
Installing SSL in MariaDB is no an option.</p>
<p dir="auto">MariaDB Server is in fact running well without SSL and accepts connections by phpMyAdmin.<br />
But with QMySqlDriver in case of MariaDB (not MySQL) there is no connectOption parameter to switch off SSL on client size.</p>
<p dir="auto">According to mariadb documentation, a local connection (filesocket!) should work without enforement of SSL.</p>
<p dir="auto">This is the disfunction in question.</p>
<p dir="auto">The QMySqlDriver connectOption 'MYSQL_OPT_SSL_MODE' ist rejected in case of MariaDB.<br />
The mariadb client can be switched in my.conf with:</p>
<pre><code>[Client]
skip-ssl=true
</code></pre>
<p dir="auto">But that is not interpreted by QMySqlDriver, which is instructed by connectOption() parameters.<br />
In qsql_mysql.cpp you can find:</p>
<pre><code>#if defined(MYSQL_VERSION_ID) &amp;&amp; MYSQL_VERSION_ID &gt;= 50711 
             &amp;&amp; !defined(MARIADB_VERSION_ID)
        {"MYSQL_OPT_SSL_MODE"_L1,   MYSQL_OPT_SSL_MODE,  setOptionSslMode},
#endif
</code></pre>
<p dir="auto">By this MariaDB is excluded from getting this parameter.</p>
<p dir="auto">(1) This error appears both on 5.15.2 and 6.10.1 compilation of the Application.<br />
(2) It appears on new LAMPP 8.2.12 (2025), NOT on old LAMPP 7.4.2 (2020)<br />
both with MariaDB (new 10.4.32, old 10.4.11)</p>
<p dir="auto">MariaDB is able to connect locally without SSL (by phpmyadmin), QMySqlDriver is not serving this opportunity.</p>
<p dir="auto">Has anyone experiences with or solutions to this problem?</p>
<p dir="auto">Thanks in advance!</p>
<hr />
<p dir="auto"><strong>My context:</strong><br />
SuSE 16 Installation<br />
Qt: 5.15.2 and 6.10.1</p>
<p dir="auto">New (with error):<br />
LAMPP 8.2.12 from 11/2025</p>
<ul>
<li>MariaDB 10.4.32</li>
<li>libmariadb.so.3   (3.1.22?)</li>
<li>MariaDB runs without SSL by default</li>
<li>OpenSSL 1.1.1</li>
</ul>
<p dir="auto">Old (without error):<br />
LAMPP 7.4.2-0 from 2020-01-30</p>
<ul>
<li>Apache 2.4.41</li>
<li>MariaDB 10.4.11</li>
<li>OpenSSL 1.1.1d</li>
<li>PHP 7.4.2</li>
<li>phpMyAdmin 5.0.1</li>
</ul>
<p dir="auto"><a href="https://mariadb.com/docs/server/security/securing-mariadb/encryption/data-in-transit-encryption/securing-connections-for-client-and-server" target="_blank" rel="noopener noreferrer nofollow ugc">MariaDB Docu SSL</a></p>
]]></description><link>https://forum.qt.io/topic/163893/mariadb-qmysqldriver-connection-without-ssl-got-2026-error</link><generator>RSS for Node</generator><lastBuildDate>Sat, 09 May 2026 18:39:19 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/163893.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 09 Dec 2025 18:48:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MariaDB &#x2F; QMySqlDriver connection without SSL got 2026 error on Wed, 01 Apr 2026 14:12:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a> Got it.<br />
Quick sidebar: Let’s be real—MySQL just hasn’t had PostgreSQL’s cultural mindshare these past few years in the tech ecosystem.</p>
]]></description><link>https://forum.qt.io/post/837483</link><guid isPermaLink="true">https://forum.qt.io/post/837483</guid><dc:creator><![CDATA[goldenhawking]]></dc:creator><pubDate>Wed, 01 Apr 2026 14:12:58 GMT</pubDate></item><item><title><![CDATA[Reply to MariaDB &#x2F; QMySqlDriver connection without SSL got 2026 error on Wed, 25 Mar 2026 16:28:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/goldenhawking">@<bdi>goldenhawking</bdi></a> I'm not sure what you want to tell us but wrt MYSQL_OPT_SSL_MODE - the doc explicitly states: "Only available when linked against MySQL 5.7.10 or higher." which matches the actual source code ( <a href="https://github.com/qt/qtbase/blob/dev/src/plugins/sqldrivers/mysql/qsql_mysql.cpp#L1227" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/qt/qtbase/blob/dev/src/plugins/sqldrivers/mysql/qsql_mysql.cpp#L1227</a> ).</p>
]]></description><link>https://forum.qt.io/post/837328</link><guid isPermaLink="true">https://forum.qt.io/post/837328</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Wed, 25 Mar 2026 16:28:42 GMT</pubDate></item><item><title><![CDATA[Reply to MariaDB &#x2F; QMySqlDriver connection without SSL got 2026 error on Wed, 25 Mar 2026 14:06:48 GMT]]></title><description><![CDATA[<p dir="auto">Yee, That's the reason. As above, Source code of qsqlmysql plugin only supports a few connection options from <a href="https://dev.mysqlserver.cn/doc/c-api/8.4/en/mysql-options.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://dev.mysqlserver.cn/doc/c-api/8.4/en/mysql-options.html</a> .  MYSQL_OPT_SSL_MODE=SSL_MODE_DISABLED can disable SSL. But this option is NOT supported with "if" blocks in qsqlmysql codes.</p>
<p dir="auto">MYSQL_OPT_SSL_MODE=SSL_MODE_DISABLED is important because that  an OLD version mysql db contains large data may be still valuable.</p>
<p dir="auto">In <a href="https://doc.qt.io/qt-6/sql-driver.html#qmysql-for-mysql-or-mariadb-5-6-and-higher" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-6/sql-driver.html#qmysql-for-mysql-or-mariadb-5-6-and-higher</a><br />
MYSQL_OPT_SSL_MODE is marked as SUPPORTED, this is a problem.</p>
]]></description><link>https://forum.qt.io/post/837324</link><guid isPermaLink="true">https://forum.qt.io/post/837324</guid><dc:creator><![CDATA[goldenhawking]]></dc:creator><pubDate>Wed, 25 Mar 2026 14:06:48 GMT</pubDate></item><item><title><![CDATA[Reply to MariaDB &#x2F; QMySqlDriver connection without SSL got 2026 error on Fri, 12 Dec 2025 19:26:08 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for you help!</p>
<p dir="auto">(1) The best solution seams to be:</p>
<pre><code>int main(int argc, char *argv[])
	{
	qputenv("MARIADB_TLS_DISABLE_PEER_VERIFICATION","1");
	// must be inserted before the constructor call of QCoreApplication
	QApplication a(argc, argv);
    // ...
    }
</code></pre>
<p dir="auto">This works for 5.(15.2) and 6.(10.1) both with minimal efforts.</p>
<p dir="auto">(2) Adding an connectOptions() part:</p>
<pre><code>MYSQL_OPT_SSL_VERIFY_SERVER_CERT = 0
</code></pre>
<p dir="auto">works only for 6.(10.1)</p>
]]></description><link>https://forum.qt.io/post/834582</link><guid isPermaLink="true">https://forum.qt.io/post/834582</guid><dc:creator><![CDATA[mediendynamik.de]]></dc:creator><pubDate>Fri, 12 Dec 2025 19:26:08 GMT</pubDate></item><item><title><![CDATA[Reply to MariaDB &#x2F; QMySqlDriver connection without SSL got 2026 error on Wed, 10 Dec 2025 13:23:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mediendynamik.de">@<bdi>mediendynamik.de</bdi></a> You're sue you cannot go with One-Way TLS for MariaDB Clients? (That way both phpMyAdnin and Qt6 clients should be able to connect.)</p>
]]></description><link>https://forum.qt.io/post/834485</link><guid isPermaLink="true">https://forum.qt.io/post/834485</guid><dc:creator><![CDATA[hskoglund]]></dc:creator><pubDate>Wed, 10 Dec 2025 13:23:04 GMT</pubDate></item><item><title><![CDATA[Reply to MariaDB &#x2F; QMySqlDriver connection without SSL got 2026 error on Wed, 10 Dec 2025 11:05:30 GMT]]></title><description><![CDATA[<p dir="auto">Qt5 is no longer supported and therefore this option is not available there. Upgrade or change your server to allow unencrypted connections.</p>
]]></description><link>https://forum.qt.io/post/834479</link><guid isPermaLink="true">https://forum.qt.io/post/834479</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Wed, 10 Dec 2025 11:05:30 GMT</pubDate></item><item><title><![CDATA[Reply to MariaDB &#x2F; QMySqlDriver connection without SSL got 2026 error on Wed, 10 Dec 2025 10:54:09 GMT]]></title><description><![CDATA[<p dir="auto">Hello Mister Ehrlicher!</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a> said in <a href="/post/834457">MariaDB / QMySqlDriver connection without SSL got 2026 error</a>:</p>
<blockquote>
<p dir="auto">You can disable the check by setting the connect option MYSQL_OPT_SSL_VERIFY_SERVER_CERT=FALSE.</p>
</blockquote>
<p dir="auto">This is not working:</p>
<pre><code>OK!  SQL Treiber: "QMYSQL" "MySQL"
QMYSQLDriver::open: Illegal connect option value 'MYSQL_OPT_SSL_VERIFY_SERVER_CERT=FALSE'
*** keine Verbindung: "werkbank" QSqlError("2026", "QMYSQL: Unable to connect", "TLS/SSL error: SSL is required, but the server does not support it")
</code></pre>
<p dir="auto">In qsql_mysql.cpp this parameter is not supported.</p>
]]></description><link>https://forum.qt.io/post/834477</link><guid isPermaLink="true">https://forum.qt.io/post/834477</guid><dc:creator><![CDATA[mediendynamik.de]]></dc:creator><pubDate>Wed, 10 Dec 2025 10:54:09 GMT</pubDate></item><item><title><![CDATA[Reply to MariaDB &#x2F; QMySqlDriver connection without SSL got 2026 error on Tue, 09 Dec 2025 19:23:48 GMT]]></title><description><![CDATA[<p dir="auto">This is due to <a href="https://mariadb.com/docs/server/security/securing-mariadb/encryption/data-in-transit-encryption/securing-connections-for-client-and-server" target="_blank" rel="noopener noreferrer nofollow ugc">https://mariadb.com/docs/server/security/securing-mariadb/encryption/data-in-transit-encryption/securing-connections-for-client-and-server</a><br />
You can disable the check by setting the connect option <code>MYSQL_OPT_SSL_VERIFY_SERVER_CERT=FALSE</code>.<br />
And yes, MariaDB simply does not provide the <code>MYSQL_OPT_SSL_MODE</code> so you can't set it in the Qt plugin either: <a href="https://github.com/mariadb-corporation/mariadb-connector-c/blob/3.4/include/mysql.h#L184" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/mariadb-corporation/mariadb-connector-c/blob/3.4/include/mysql.h#L184</a></p>
]]></description><link>https://forum.qt.io/post/834457</link><guid isPermaLink="true">https://forum.qt.io/post/834457</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Tue, 09 Dec 2025 19:23:48 GMT</pubDate></item></channel></rss>