I have just done a fresh install of OMV5 and I am in the process of setting up Nextcloud via Docker. I have followed this guide https://forum.openmediavault.o…g-omv-and-docker-compose/and I have the containers set up and working. The problems began when I opened Nextcloud for the first time and tried to configure the database:
Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'root'@'nextcloud.nextcloud_default' (using password: YES)
Now I did the initial install with these settings in docker-compose.yml:
environment:
- PUID=1001 #change PUID if needed
- PGID=100 #change PGID if needed
- MYSQL_ROOT_PASSWORD=mypasshere
But it did not work. I then tried to run mysql -u root -p inside the container as per these instructions RE: Nextcloud with Letsencrypt using OMV and docker-compose - Q&A but it just kept saying "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)" even though the password was most definitely correct. I verified the password in the container settings and it was correct.
I googled some more and found this thread RE: Nextcloud with Letsencrypt using OMV and docker-compose - Q&A which has a post saying to set up mariadb with these parameters:
So I changed those in docker-compose.yml, (in order to rule out locale issues I tested this with just secretpassword) ran docker-compose up -d but I am still having the same problem with the Nextcloud setup and I still can't access the database via CLI.:
root@39142896bec1:/# mysql -u nextcloud -p
Enter password: (TRIED PUTTING SECRETPASSWORD HERE)
ERROR 1045 (28000): Access denied for user 'nextcloud'@'localhost' (using password: YES)
This is not making any sense, it seems that for some reason the user settings for mariadb are being ignored and I therefore can't access the database. There are no errors in the nextclouddb container logs and the config looks ok:
What on earth could be the problem?