Docker: Nextcloud cannot communicate with MariaDB

  • Hi,


    I am sorry to ask this (very likely) newbie question:
    Following TechniDadLife Tutorial for Nextcloud (

    ) I am not able to complete the nextcloud installation. Once I open the nextcloud installation page and enter all data, I get the following error message:

    Code
    Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused

    MariaDB is running and both are, judging from my not knowledge, in the same network when I check it in Docker.


    When I check the MariDB Container Log I see "Warning: World-writable config file '/etc/mysql/conf.d/custom.cnf' is ignored" - might this be an issue?


    Any suggestion to fix this is highly appreciated, thanks a lot in advance!

  • I was in a hurry. The problem was access rights to the AppData folder, which the author did not mention in his video. After setting full access rights for all users, the problem was resolved. And instead of Localhost, I entered 192.168.10.21 (my IP address): 3306

  • I have the same problem. Installed on ROCKPro64, lsioarmhf containers.

    You are using the wrong image. lsioarmhf has been depricated. I know it is still available, but read the info page for it. Use the regular linuxserver/nextcloud image and insert the tag arm64v8-latest in the upper right corner of the image before you click run. On the info page linked above, scroll down a bit and you will see the three architectures supported by the image. Depending on what board you are installing Nextcloud (or any docker) you need to add the appropriate tag. Hope this helps.

    RAID is NOT a backup and not useful for most home users. Rsync makes true backup and restoration stupid easy, and it's built right in to OMV. Use this command in a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-NAMEofSOURCEdisk/ /srv/dev-disk-by-label-NAMEofDESTINATIONdisk/

    Hardware: OMV 5 (current) - NanoPi M4: Nextcloud, Plex, & Heimdall - Acer Aspire T180: backup - Odroid XU4: Pi-Hole (DietPi) - Odroid HC2, Raspberry Pi 3B+, and HP dx2400: testing.

  • Please tell me what permissions the AppData, Nextcloud (inside AppData), Nextclouddb, Nextcloud (at the root) folders should have. Like on a picture.

    Read and Write. The first check box on each line.

    And what user data needs to be specified? Root, admin, or do you need to create a new user?

    You need to create a user other than root and admin.

    RAID is NOT a backup and not useful for most home users. Rsync makes true backup and restoration stupid easy, and it's built right in to OMV. Use this command in a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-NAMEofSOURCEdisk/ /srv/dev-disk-by-label-NAMEofDESTINATIONdisk/

    Hardware: OMV 5 (current) - NanoPi M4: Nextcloud, Plex, & Heimdall - Acer Aspire T180: backup - Odroid XU4: Pi-Hole (DietPi) - Odroid HC2, Raspberry Pi 3B+, and HP dx2400: testing.

  • Use the regular linuxserver/nextcloud image and insert the tag arm64v8-latest in the upper right corner of the image before you click run.

    I must correct myself. in the docker info page under Supported Architecture it reads "Simply pulling linuxserver/plex should retrieve the correct image for your arch, but you can also pull specific arch images via tags."

    RAID is NOT a backup and not useful for most home users. Rsync makes true backup and restoration stupid easy, and it's built right in to OMV. Use this command in a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-NAMEofSOURCEdisk/ /srv/dev-disk-by-label-NAMEofDESTINATIONdisk/

    Hardware: OMV 5 (current) - NanoPi M4: Nextcloud, Plex, & Heimdall - Acer Aspire T180: backup - Odroid XU4: Pi-Hole (DietPi) - Odroid HC2, Raspberry Pi 3B+, and HP dx2400: testing.

  • So this happened to me, but I think the reason is because I am using an ntfs formatted disk plugged into a Raspi 4. ntfs appears to be run from Fuse and thus all perms are 777 (owner/user/other read/write/x) so this is why I think I am getting this error. I'm not sure how to get around this other than start over with another drive possibly formatted as ext4 since it's a 4tb drive.


    For me the primary reason to use OpenMediaVault is for a secondary backup location w/ Sharing capabilities, and ntfs does make it easy to just unplug from OMV and plug directly into a Windows or MAC so I'm not keen on changing.


    Maybe there's a workaround. I have a few ideas..
    1. There's a 32g card in my Raspi 4. OMV only uses 2g or so. I could run fdisk and reclaim some space and use 20g or so for a small partition to run on ext4 fs and let Nextcloud run from there
    2. Use a powered USB hub and plug in another disk formatted to ext4 and install NextCloud there.
    3. Perhaps there's another way to coerce the mounts from /etc/fstab to get it to load differently, although I haven't messed with it yet.


    Any ideas appreciated!

  • If you want to use your current disk with OMV on a permanent basis, you should switch the filesystem to ext4.
    ntfs is not recommended for constant use with OMV. It is only supported for temporary purpose like importing or exporting files.


    So you would have to wipe the disk (all data on the drive will be lost), create a new filesystem and restore your data from the backup.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!