Docker: Nextcloud cannot communicate with MariaDB

  • Hi,


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

    External Content www.youtube.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.
    ) 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.

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

  • And what user data needs to be specified? Root, admin, or do you need to create a new user? And all the same, if not difficult, please show your settings.

  • 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.

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

  • 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."

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

  • 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!

    I is the quizat haderach
    --
    OMV 4.x - Raspi 4 4g 4tb R1

  • 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!