Comments - Installing and Using MariaDB via Docker

2 years, 7 months ago Mikhail Klemin

I tried the example on Ubuntu 21.04. It was not working

mysql -h 172.17.0.2 -P 3306 --protocol=TCP -u root -p
ERROR 2002 (HY000): Can't connect to MySQL server on '172.17.0.2' (115)

Changing to

mysql -h 127.0.0.1 -P 3306 --protocol=TCP -u root -p

made it work

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 5
Server version: 10.5.12-MariaDB-1:10.5.12+maria~focal mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.