. Most Debian and Ubuntu versions have official packages that can be installed with apt-get install phpmyadmin
.
If you are using a version that does not have phpMyAdmin included, or wish to use a newer version, you have several alternatives available.
Tagged issues for packaging are: there
Related issues and comments on install methods
This are comments and issues related to installing phpMyAdmin from different sources:
- Debian buster-backports (15236#issuecomment-615954993)
- Debian bullseye-backports (15236#issuecomment-1008320995) (15236#issuecomment-1008320995)
- Ubuntu PPA on Debian (16065#issuecomment-609035410)
- Ubuntu PPA (15515#issuecomment-552211446)
- Ubuntu PPA on old Ubuntu versions (current supported versions: focal, impish) (16065#issuecomment-609035410)
Ubuntu PPA support
List
jammy
(last update: 5.1.4 – 2022-05-25)impish
(last update: 5.1.4 – 2022-05-25)focal
(last update: 5.1.4 – 2022-05-25)
Old distros
I am unable to upload new changes, Ubuntu rejects them (date of the rejection: 12/02/2022) because the versions are ended.
Rejected: eoan is obsolete and will not accept new uploads.
bionic
(blocked at 5.1.1, last upload: 2021-06-18)eoan
(blocked at 4.9.5, last upload: 2020-03-26)
Rejected:
bionic is obsolete and will not accept new uploads.
Rejected:
eoan is obsolete and will not accept new uploads.
Bullseye backports
To install from Debian bullseye-backports
, create a new apt sources file, /etc/apt/sources.list.d/bullseye-backports.list
, and add this line:
deb http://deb.debian.org/debian bullseye-backports main
Then run apt-get update
to refresh the package cache.
You can now install phpMyAdmin normally:
apt-get install -t bullseye-backports phpmyadmin
Buster backports
To install from buster-backports, create a new apt sources file, /etc/apt/sources.list.d/buster-backports.list
, and add this line:
deb http://deb.debian.org/debian buster-backports main
Then run apt-get update
to refresh the package cache.
Because Buster comes with an older version of php-twig, you probably have to manually install the backports version:
apt-get install -t buster-backports php-twig
You can now install phpMyAdmin normally:
apt-get install -t buster-backports phpmyadmin
Ubuntu PPA
There is a Ubuntu PPA maintained by phpMyAdmin team members. Using it is simple:
sudo add-apt-repository ppa:phpmyadmin/ppa
sudo apt-get update
sudo apt-get install phpmyadmin
Manually
Finally, you can always perform a manual installation.
Packaging status
Testing packages
Testing the Ubuntu PPA package with docker
Run an interactive container: docker run --rm -p 8091:80 -it ubuntu:impish bash
apt update # Install the "add-apt-repository" command apt install software-properties-common -y # Add the phpMyAdmin PPA add-apt-repository ppa:phpmyadmin/ppa # Follow the instructions of "Install and test the package"
Testing the Debian package with docker (from Debian testing)
Run an interactive container: docker run --rm -p 8091:80 -it debian:testing bash
apt update # Follow the instructions of "Install and test the package"
Testing the Debian package with docker (from Debian sid)
Run an interactive container: docker run --rm -p 8091:80 -it debian:sid bash
apt update # Follow the instructions of "Install and test the package"
Install and test the package
# Install phpMyAdmin apt install phpmyadmin -y # Install PHP for apache2 apt install libapache2-mod-php -y # Start apache2 service apache2 start # Browse the page http://127.0.0.1:8091/phpmyadmin/
Advanced testing
# Advanced testing apt install mariadb-server -y # Start MariaDB service mariadb start # Create a database named "public" mariadb -e "CREATE DATABASE public;" # Set root password to "public" for login mariadb -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('public');" # Login on the page http://127.0.0.1:8091/phpmyadmin/ # Enjoy !
Adding data
From: https://github.com/phpmyadmin/scripts/tree/master/demo/sql
# Download data php -r "file_put_contents('/tmp/world.sql', file_get_contents('https://raw.githubusercontent.com/phpmyadmin/scripts/master/demo/sql/world.sql'));" php -r "file_put_contents('/tmp/world_borders.sql', file_get_contents('https://raw.githubusercontent.com/phpmyadmin/scripts/master/demo/sql/world_borders.sql'));" php -r "file_put_contents('/tmp/opengis.sql', file_get_contents('https://raw.githubusercontent.com/phpmyadmin/scripts/master/demo/sql/opengis.sql'));" php -r "file_put_contents('/tmp/sakila-schema.sql', file_get_contents('https://raw.githubusercontent.com/phpmyadmin/scripts/master/demo/sql/sakila-db/sakila-schema.sql'));" php -r "file_put_contents('/tmp/sakila-data.sql', file_get_contents('https://raw.githubusercontent.com/phpmyadmin/scripts/master/demo/sql/sakila-db/sakila-data.sql'));" # Inject the data mysql -uroot -ppublic public < /tmp/world.sql mysql -uroot -ppublic public < /tmp/world_borders.sql mysql -uroot -ppublic public < /tmp/opengis.sql mysql -uroot -ppublic public < /tmp/sakila-schema.sql mysql -uroot -ppublic public < /tmp/sakila-data.sql # Cleanup rm /tmp/*.sql
source : https://github.com/phpmyadmin/phpmyadmin/wiki/DebianUbuntu