I have a remote server running MariaDB 10.6 database. I have all credentials.
I have tried regular connection command line on my PC and it works perfectly: mysql -P3307 -hmyurl.com -u myuser -pmypass mydatabase. However when I try it in Docker in Ubuntu I'm getting
Access denied for user 'myuser '@'10.62.193.7' (using password: YES)
After quite some debugging, I figured out that the error appears only if I use apt install mariadb-client (either on Ubuntu 20.04 or 22.04). If I install apt install mysql-client it works perfectly.
Is there anything I can do to make mariadb-client working? I also use it somehow from Python (mysqlclient) and it seems to rely on mariadb-client as well, so I cannot basically connect from Python in this case...
P.S. I do not have admin control over the database server, so I cannot modify settings of the database.
Finally after many hours of digging, I figured out the solution, thanks to the colleague of mine.
TLDR: The root cause of this was the configuration of the server which enforces TLSv1.2 and
mariadb-clientwhich does not like it by default.More details:
So when I added single
--sslparameter to the call when usingmariadb-client, to my surprise, it actually worked!