Closed BudBundi closed 5 years ago
Encountered the same problem, see the following error msg for reference
Thats because Mariadb connects using the socket protocol.
Specifies the protocol to be used for the connection for the connection. It can be one of TCP, SOCKET, PIPE or MEMORY (case-insensitive). Usually you would not want to change this from the default. For example on Unix, a Unix socket file (SOCKET) is the default protocol, and usually results in the quickest connection.
More info https://mariadb.com/kb/en/library/connecting-to-mariadb/
Actually your right, i've just checked on the previous build
Version: '10.2.19-MariaDB-log' socket: '/run/mysqld/mysqld.sock' port: 3306 MariaDB Server
Version: '10.3.12-MariaDB' socket: '/run/mysqld/mysqld.sock' port: 0 MariaDB Server
Using option: --skip-networking=0 --bind-address=0 -P3306 solves the issue for me.
I just fixed my current docker compose script by:
COPY ./check.sh /scripts/pre-exec.d
#Adding comment to configuration:
sed -i.bak s/^skip-networking/\#skip-networking/g /etc/my.cnf.d/mariadb-server.cnf
Fixed in the latest version
Version: '10.3.12-MariaDB' socket: '/run/mysqld/mysqld.sock' port: 3306 MariaDB Server
Because the logs, I overlooked the bigger problem, container is not reachable from the outside. I also try to create a new database but the container refuse all connections, so I see in the logs:
Version: '10.3.12-MariaDB' socket: '/run/mysqld/mysqld.sock' port: 0 MariaDB Server
The port is wrong, maybe a wrong default configuration?