phpMyAdmin on OpenMediaVault with Docker and Portainer | Raspberry Pi

In this segment, we are going to explain to you “How you can install phpMyAdmin with MariaDB on OpenMediaVault with the help of Docker and Portainer for Raspberry Pi all models”

phpMyAdmin requires MariaDB/MySQL

To start the setup first we need to install MariaDB and then we can go ahead and install phpMyAdmin.

What is OpenMediaVault?

OpenMediaVault (OMV) is a free Linux distribution designed for network-attached storage (NAS). The project’s lead developer is Volker Theile, who instituted it in 2009. OMV is based on the Debian operating system and is licensed through the GNU General Public License v3.

Source /> Wikipedia

OpenMediaVault Versions :

OpenMediaVault 5 Installation Guide : 

Software Required :

Equipment Required Optional
Raspberry Pi Raspberry Pi 4 Case
SD_Card SD Card Keyboard
Ethernet Ethernet Cable Mouse
Charger Power Adapter    
HDD External HDD    
Buy Now

You can Buy Raspberry Pi 4 Kit from here

What is MariaDB?

mariadb

MariaDB is a community-developed, commercially supported fork of the MySQL relational database management system (RDBMS), intended to remain free and open-source software under the GNU General Public License. Development is led by some of the original developers of MySQL, who forked it due to concerns over its acquisition by Oracle Corporation in 2009.

Source // Wikipedia

Pull MariaDB through Command

To download MariaDB through the command line, we need to login to SSH and use the below-given command to download the image.

sudo docker pull mariadb

Credit to Linux Server

sudo docker pull linuxserver/mariadb
  • If the first command doesn’t work you can always use the second one.
  • After the image is successfully downloaded, we can go ahead and start configuring the container.

Docker Compose

---
version: "2.1"
services:
  mariadb:
    image: linuxserver/mariadb
    container_name: mariadb
    environment:
      - PUID=1000
      - PGID=1000
      - MYSQL_ROOT_PASSWORD=ROOT_ACCESS_PASSWORD
      - TZ=Europe/London
      - MYSQL_DATABASE=USER_DB_NAME #optional
      - MYSQL_USER=MYSQL_USER #optional
      - MYSQL_PASSWORD=DATABASE_PASSWORD #optional
      - REMOTE_SQL=http://URL1/your.sql,https://URL2/your.sql #optional
    volumes:
      - path_to_data:/config
    ports:
      - 3306:3306
    restart: unless-stopped

MariaDB Container Configuration

  • First of all, we need to navigate to containers and click on add container.
  • Now, we need to type a name for our container and select the image in the next section.
  • After that, we need to concentrate on 3 things only i.e Volume, Environment, and Restart Policy.

The Default Port for MariaDB is 3306, you can always bind the port with some other port according to our requirement or if the port is already in use.

mariadbClick to Zoom

In the volume section, we need to configure one path for the config folder and bind the folder to our desired path.

MariaDBClick to Zoom

After that we need to configure Environment Variables as mentioned below in the picture.

Environment variables

TZ
PUID
PGID
MYSQL_ROOT_PASSWORD
MYSQL_DATABASE
MYSQL_USER
MYSQL_PASSWORD

mariadbClick to Zoom

In this section we need to select unless stopped.

MariaDBClick to Zoom

  • Once all the settings configured correctly we can go ahead and Deploy the container.

What is phpMyAdmin?

phpMyAdmin is a free and open-source administration tool for MySQL and MariaDB. As a portable web application written primarily in PHP, it has become one of the most popular MySQL administration tools, especially for web hosting services.

Source // Wikipedia

phpMyAdmin

Credits to EBSPACE

  • Full Credit goes to ebspace
  • For creating a phpMyAdmin image for Raspberry Pi.

Command to pull Image

docker pull ebspace/armhf-phpmyadmin

Adding Custom Configuration

You can add your own custom config.inc.php settings (such as Configuration Storage setup) by creating a file named “config.user.inc.php” with the various user-defined settings in it, and then linking it into the container using:

docker run --name myadmin -d --link mysql_db_server:db -p 8080:80 -v /local_dir/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php ebspace/armhf-phpmyadmin

  • Secondly, we need to navigate to containers and click on add container.
  • Now, we need to type a name for our container and select the image in the next section.
  • After that, we need to concentrate on 3 things only i.e Volume, Environment, and Restart Policy.

The Default Port for phpMyAdmin is 80you can always bind the port with some other port according to our requirement or if the port is already in use.

phpMyAdmin

  • In the volume section, we need to configure one path for the config folder and bind the folder to our desired path.

phpMyAdmin

After that we need to configure Environment variables as mentioned below in the picture.

Environment variables

  • PMA_ARBITRARY – when set to 1 connection to the arbitrary server will be allowed
  • PMA_HOST – define address/hostname of the MySQL server
  • PMA_VERBOSE – define the verbose name of the MySQL server
  • PMA_PORT – define port of the MySQL server
  • PMA_HOSTS – define a comma-separated list of address/hostnames of the MySQL servers
  • PMA_VERBOSES – define a comma-separated list of verbose names of the MySQL servers
  • PMA_USER and PMA_PASSWORD – define username to use for the config authentication method
  • PMA_ABSOLUTE_URI – define user-facing URI

phpMyAdmin

In this section we need to select unless stopped.

phpMyAdmin

Finally, we can go ahead and access our phpMyAdmin on http://omv_ip_address:8085, because we have bound the port 8085 to port 80.

Need to go through Posts

Did you find us helpful?

Subscribe our YouTube Channel
Like us on Facebook facebook
Support us on Patreon Patreon
Share This Article with others

Harish Kumar

As a founder of the PcMac YouTube channel and website, Our goal is to provide Free Technical help to people and spread knowledge to everyone.

Leave a Reply