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 :

Recommended Articles

 

Equipment RequiredOptional
Raspberry Pi
Raspberry Pi 4Case
SD_CardSD CardRaspberry Pi Keyboard
Ethernet
Ethernet CableMouse
ChargerPower Adapter
HDDExternal 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 log in 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 are 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 is 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 port 8085 to port 80.
  • If you come across any issue with this article, please share your thoughts.

Did you find us helpful?

Support us on Patreon, Follow us on Facebook

 

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 votes
Article Rating
Subscribe
Notify of
guest
8 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Jorge
Jorge
4 years ago

i great video. I just have a problem after myip:8090/phpmyadmin, i get a blank page
Help!!! thanks

Tobias
Tobias
Reply to  Harish Kumar
3 years ago

you only install the mariadb docker. there is no further information about a phpmydamin container. so you can not acces to rasperryIP:3306/phpmyadmin

marcio
marcio
1 year ago

SQLSTATE[HY000] [1130] Host ‘172.17.0.1’ is not allowed to connect to this MariaDB server da dando esse erro no meu nextcloud como resolvo eu fiz ja esse procedimento na pasta etc/mysql/ innodb_read_only_compressed=0 mais nao resolve

nextcloud.PNG
johannes
1 year ago

Hello

I am gettin "exec /entrypoint.sh: exec format error" when using theubuntu 22.04 64bit desktop when using linuxserver/phpmyadmin image but the official image work perfect.
Yevgen
Yevgen
1 year ago

Hello! It is very strange, I did it several times as in the instructions and the same result. When installing phpmyadmin, I specify the port, but as a result, they are not registered in the container.

phpMyAdminError.jpg