yobasystems / alpine-mariadb

MariaDB running on Alpine Linux [Docker]
https://hub.docker.com/r/yobasystems/alpine-mariadb/
237 stars 71 forks source link

After update to new image with MariaDB 10.3.12 no connection possible #24

Closed BudBundi closed 5 years ago

BudBundi commented 5 years ago

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?

HoiPangCHEUNG commented 5 years ago

Encountered the same problem, see the following error msg for reference

time="2019-02-12T09:40:38Z" level=fatal msg="dial tcp 172.24.0.1:3306: connect: connection refused"

dominictayloruk commented 5 years ago

Thats because Mariadb connects using the socket protocol.

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/

dominictayloruk commented 5 years ago

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

whalevillage commented 5 years ago

Using option: --skip-networking=0 --bind-address=0 -P3306 solves the issue for me.

KingRial commented 5 years ago

I just fixed my current docker compose script by:

dominictayloruk commented 5 years ago

Should be fixed in https://github.com/yobasystems/alpine-mariadb/commit/19cab7832101152cd4cbee71e923229646d7cf12

dominictayloruk commented 5 years ago

Fixed in the latest version

Version: '10.3.12-MariaDB' socket: '/run/mysqld/mysqld.sock' port: 3306 MariaDB Server