I was using the connection to the remote Mariadb server for months. Today the connection couldn't be established anymore via the python mariadb module and the mariadb connector on macOS. The basic installation is as follows:
brew install mariadb-connector-c
pip install mariadb
To connect to the server via python:
>>> import mariadb
>>> mariadb.connect(host="<IP>", port=3306)
The return is:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/<name>/miniconda3/lib/python3.8/site-packages/mariadb/__init__.py", line 142, in connect
connection = connectionclass(*args, **kwargs)
File "/Users/<name>/miniconda3/lib/python3.8/site-packages/mariadb/connections.py", line 83, in __init__
super().__init__(*args, **kwargs)
mariadb.OperationalError: Can't connect to server on '<IP>' (60)
I can connect to the MariaDB server via the terminal mysql client (mysql -h ) as well as establish a connection using the telnet module:
>>> import telnetlib
>>> telnetlib.Telnet(host="<IP>", port=3306)
I also can connect to a locally installed mariadb server via python and the mariadb module. Remote throws the above error though.
Anyone an idea why the connection can't be established?