Owncloud docker has no connection to mysql host

After update to UCS 4.3 and to owncloud 10, owncloud has no connection to mariadb.

Log of the owncloud dockerdocker logs ba7b3e93c2f3:

wait-for-it: waiting 180 seconds for
wait-for-it: timeout occurred after waiting 180 seconds for

The host has also no connection telnet 3306

telnet: Unable to connect to remote host: Connection refused

But to 3306 its connected.

How can the owncloud docker connects the host db?


“Connection refused” is usually due to one of the following issues:

  1. The server that should listen on the port isn’t running in the first place.
  2. The server is running, but it is configured to listen on some IP addresses only, but not on the one you’re trying to connect to.
  3. Firewall rules prohibit the connection with action REJECT (action DROP would lead to a different error message: “connection timed out”).

Therefore verify those three things in order. First make sure MariaDB is running. Next look which ports it is listening on, e.g.:

[0 root@backup2 ~] lsof -PniTCP:3306 -sTCP:LISTEN
mysqld  1383 mysql   19u  IPv4  24616      0t0  TCP *:3306 (LISTEN)

The …TCP *:3306… means that my daemon is listening on all IP addresses. Other common patters are …TCP…, which would mean that it is only listening on the local-loopback interface.

Last check your firewall setup if both prior tests indicate that things should work.

Kind regards,

That was the output of the lsof command. The Problem was a false Symlink of /etc/alternatives/my.cnf -> /etc/mysql/my.cnf.migrated, that contains a loopback binding. I set my.cnf to /etc/mysql/mariadb.cnf, which bind to

Many Thanks.