How to Install MariaDB on Your UGREEN NAS

How to Install MariaDB on Your UGREEN NAS

MariaDB is one of the most popular database servers. MariaDB is a community-developed, commercially-supported fork of the MySQL relational database management system, intended to remain free and open-source software under the GNU, General Public License. In this step by step guide I will show you how to install MariaDB on your UGREEN NAS using Docker & Portainer.

šŸ’”Note:Ā This guide works perfectly with the latest MariaDB 11.4.6 release.

šŸ’”Note: Check out my new guide on how to Install MariaDB on Your Synology NAS.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

āš ļøMandatory Add Read & Write Permissions to the Docker Folder. If you have already added the Read and Write Permissions to the Docker Folder, skip this STEP.

  • STEP 3

āš ļøMandatory: Update your UGREEN NAS Firmware to the latest version. Go to Control Panel / Update and update your NAS with the latest Firmware.

  • STEP 4

Install Text Editor via UGREEN ā€œApp Centerā€. (Mandatory STEP.) If you already have Text Editor installed on your UGREEN NAS, skip this STEP.

MariaDB UGREEN NAS Portainer Set Text Editor

  • STEP 5

InstallĀ Portainer using my step by step guide. If you already have Portainer installed on your UGREEN NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.

  • STEP 6

Go toĀ File Manager and open the docker folder. Inside the docker folder, create one new folder and name it mariadb. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

MariaDB UGREEN NAS Portainer Set up 2 new 2025

  • STEP 7

Now create one new folder inside the mariadb folder that you have previously created at STEP 6 and name it phpmyadmin. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

MariaDB UGREEN NAS Portainer Set up 3 new 2025

  • STEP 8

Download (click on the blue link below) then unzip and upload the uploads.ini file below in the phpmyadmin folder that you have previously created at STEP 7. Follow the instructions in the image below. šŸ”’Note: Support my work to unlock the password. You can use this password to download any file on mariushosting forever!

šŸ‘‰šŸ»Download uploads.ini

MariaDB UGREEN NAS Portainer Set up 4 new 2025

  • STEP 9

Log into Portainer using your username and password. On the left sidebar in Portainer, click on StacksĀ thenĀ + Add stack. Follow the instructions in the image below.

UGREEN NAS Portainer Add Stack

  • STEP 10

In the Name field type in mariadb. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

services:
  mariadb:
    image: mariadb:11.4 #LTS Long Time Support Until May 29, 2029.
    container_name: MariaDB
    volumes:
      - /volume1/docker/mariadb:/var/lib/mysql:rw
    environment:
      - MYSQL_ROOT_PASSWORD=mariushosting
      - TZ=Europe/Bucharest
      - PGID=999
      - PUID=10
    ports:
      - 3306:3306
    restart: on-failure:5

  phpmyadmin:
    image: phpmyadmin:latest
    container_name: phpMyAdmin
    healthcheck:
     test: curl -f http://localhost:80/ || exit 1
    environment:
      - PMA_PORT=3306
      - PMA_HOST=192.168.0.188
    volumes:
      - /volume1/docker/mariadb/phpmyadmin/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini:rw
    ports:
      - 2500:80
    depends_on:
      - mariadb
    restart: on-failure:5

Note: Before you paste the code above in the Web editor area below, change the value for MYSQL_ROOT_PASSWORD and type in your own password. mariushosting is an example for a password. You will need this password later at STEP 14. āš ļøWarning: Do NOT use a complicated password with special characters.
Note: Before you paste the code above in the Web editor area below, change the value for TZ.Ā (Select your current Time Zone from this list.)
Note: Before you paste the code above in the Web editor area below, change the value numbers for PUIDĀ andĀ PGIDĀ with your own values. (Follow my step by step guide on how to do this.)
Note: Before you paste the code above in the Web editor area below, change the value of PMA_HOST and add your own LOCAL NAS IP. 192.168.0.188 is my own UGREEN NAS IP. You should use your own UGREEN NAS IP.

MariaDB UGREEN NAS Portainer Set up 5 new 2025

  • STEP 11

Scroll down on the page until you see a button called Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

MariaDB UGREEN NAS Portainer Set up 6 new 2025

  • STEP 12

If everything goes right, you will see the following message at the top right of your screen: ā€œSuccess Stack successfully deployedā€œ.

MariaDB UGREEN NAS Portainer Set up 7 new 2025

  • STEP 13

šŸŸ¢Please Support My work by Making a Donation. Almost 99,9% of the people that install something using my guidesĀ forget to support my work, or justĀ ignoreĀ STEP 1. Iā€™ve been very honest about this aspect of my work since the beginning: I donā€™t run any ADS, I donā€™t require subscriptions, paid or otherwise, I donā€™t collect IPs, emails, and I donā€™t have any referral links from Amazon or other merchants. I also donā€™t have any POP-UPs or COOKIES. I have repeatedly been told over the years how much I have contributed to the community. Itā€™s something I love doing and have been honest about my passion since the beginning. But I also Need The Community to Support me Back to be able to continue doing this work.

  • STEP 14

The installation process can take up to a few seconds/minutes. It will depend on your Internet speed connection. Now open your browser andĀ type in http://ugreen-ip-address:2500 Connect to your MariaDB using root as Username and the MYSQL_ROOT_PASSWORD you have previously chosen at STEP 10. Click Log in. Follow the instructions in the image below. Note: MariaDB doesn’t have a graphical interface; it works in the background. In order to view and create new databases you will need to use phpMyAdmin.

MariaDB UGREEN NAS Portainer Set up 8 new 2025

  • STEP 15

Your phpMyAdmin container with MariaDB database at a glance!

MariaDB UGREEN NAS Portainer Set up 9 new 2025

  • STEP 16

Fix the phpMyAdmin configuration storage issue.

Enjoy MariaDB!

šŸ†˜TROUBLESHOOTING

Note: If you want to run the MariaDB and phpMyAdmin container over HTTPS, check out How to Run Docker Containers Over HTTPS on Your UGREEN NAS.

This post was updated on Thursday / March 27th, 2025 at 11:37 PM