Docker: Nextcloud cannot communicate with MariaDB

  • Hi,


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

    Externer Inhalt www.youtube.com
    Inhalte von externen Seiten werden ohne Ihre Zustimmung nicht automatisch geladen und angezeigt.
    Durch die Aktivierung der externen Inhalte erklären Sie sich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.
    ) 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

    • Offizieller Beitrag

    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

    • Offizieller Beitrag

    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.

    • Offizieller Beitrag

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

  • 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

    • Offizieller Beitrag

    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.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!