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.

OpenMediaVault Versions :

OpenMediaVault 5 Installation Guide : 

Software Required :

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

We may earn a commission for purchases using our links. Learn more.

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.

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 and click on the add container.
  • Now, we need to type a name 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 this section, we need to configure one path for the config folder and bind this 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. This is the most popular MySQL administration tool to manage databases and widely used in web hosting services.

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 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 and click on add container.
  • Now, we need to type a name 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 section, we need to configure one path for the config folder and bind this 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

In conclusion

  • Now, we can go ahead and access our phpMyAdmin on http://omv_ip_address:8085 because we have bound the port 8085 to port 80.
  • If you come across any issue with this article, please share your thoughts.

Need to go through Posts

Did you find us helpful?

Subscribe our YouTube Channel YouTube
Support us on Patreon Patreon
Like us on Facebook facebook
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.
0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments