Search code examples
pythonmacossslmariadbnas

MariaDB update causes client connection problem : mariadb.OperationalError: TLS/SSL error: SSL is required, but the server does not support it


After updating Python mariadb to 1.1.10 (mariadbconnector-c version 3.4.1).

I can't connect to the database through Python anymore. Worked for several years and now this error.

I don't need SSL or TLS for now. Server side does not use this (mysql on NAS synology using mariadb 10.11.6).

Clients are using macos running sonoma 14.6.1. Debugging python code halts at the line

super().__init__(*args, **kwargs) in the init def of class Connection (connections.py) from mariadb package.

It seems to force SSL while it is not set as a argument

connection = mariadb.connect(host=e_host,user=get_user_NAS(),password=get_pw_NAS(),database=database_name).

This code worked for years, so there was a change made that causes this.

How to disable this in the client?

Tried ssl_verify_cert set to false but no change. Tried previous version of mariadb package, but can't install previous mariadb connector-c with brew, only the 3.4.1. So, I am stuck now.. Any idea how to set this off?

When using client through terminal it connects, don't even have to pass --ssl=0 as param to make a connection. Only when using Python's mariadb.

I can't seem to connect anymore.

OpenSSL 3.3.2 is installed.


Solution

  • Unfortunately Connector/C 3.4.1 was marked as GA and released during my vacation, so I wasn't able to release a matching version of Connector/Python (which will happen this week).

    To fix this problem, you have 3 solutions:

    1. Wait until C/Python 3.1.11 was released and brew provides latest version

    2. Configure your server with TLS

    3. Uninstall latest MariaDB Connector/Python and build it from source (1.1 branch on github)