I am doing a fresh nextcloud installation using a web installer, the mariadb is running in the docker container.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e7b5d6ac8d8d mariadb:10.4 "docker-entrypoint.s…" 3 hours ago Up 2 hours 0.0.0.0:3306->3306/tcp dockercompose_mariadb_1
0c90a3869409 redis:6.0.9 "docker-entrypoint.s…" 10 months ago Up 2 hours 0.0.0.0:7001->6379/tcp redis1
in which I already have created the nextcloud db and nextcloud user.
5: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:10:12:29:cd brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1
I have tried it but I get this error:
# mysql -u root -h 172.17.0.1 -P 3306 -p
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '172.17.0.1' (113 "No route to host")
however just to ensure the nextcloud user in mariadb is set correctly:
I would recommend you familiarize yourself with docker and especially docker networking concepts. Depending what you are trying to achieve using host network driver would be a solution.
In my eyes there is no reason to link “normal” Nextcloud instance to dockerized database, I would suggest either all docker or all local, but you might have reasons to do so.
fair enough but in past this was the setup, and it was working fine. Now that machine that was running docker is broken, i had a back up of db and data and want to spin it again on the new node.
don’t get me wrong: mixing technologies is not bad if you do it for reasons… Each technology decision has its advantages and drawbacks, I’m big fan of docker but I understand some people prefer bare-metal install.
If you were running this setup because you want to - go on. But you should not follow the path just because it was running good for some time - from your post it looks you are not familiar with docker - this an argument against using it.
This outage is chance to review the architecture, backup and restore procedures, documentation of the system and align this topic with your knowledge and requirements - use it.