-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
DebianUbuntu
There are several options for installing phpMyAdmin on a Debian or Ubuntu system.
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
This are comments and issues related to installing phpMyAdmin from different sources:
- Debian buster-backports (15236#issuecomment-615954993)
- Debian bullseye-backports (last-update: 03/2023 to 5.2.1) (15236#issuecomment-1008320995) (15236#issuecomment-1008320995) (15236#issuecomment-1008320995)
- Ubuntu PPA on Debian -> scroll down to On Debian or without
add-apt-repository
- Ubuntu PPA on Ubuntu LTS (current supported versions: focal, jammy) -> scroll down to How to install/Ubuntu LTS
- Ubuntu PPA on other/old/non LTS Ubuntu versions (current supported versions: focal, jammy) -> scroll down to On non LTS Ubuntu
Ref: Ubuntu Updates RSS
Ubuntu PPA support
5.2 is supported since recently: https://tracker.debian.org/news/1414560/accepted-phpmyadmin-4520dfsg1-2-source-into-unstable/
About 2FA/U2F support: https://github.com/phpmyadmin/phpmyadmin/issues/16779 Fido U2F is supported since recently.
More informations about versions: https://endoflife.date/ubuntu
-
18.04 - ❌⬇️ LTS -(outdated packages still available)bionic
(blocked at 5.1.1, last upload: 2021-06-18), ended 04/2023 -
19.10 - ❌⬇️(deleted all packages from the PPA on 17/12/2022)eoan
(blocked at 4.9.5, last upload: 2020-03-26), closed: 07/2020 -
20.04 - ❌⬇️ LTS -(outdated packages still available)focal
(last update: 5.2.1 - 2023-04-27) - closed 07/2023 -
21.10 - ❌⬇️ LTS(outdated packages still available)impish
(last update: 5.1.4 - 2022-05-25) - closed 07/2022 - 22.04 - ✅ LTS
jammy
(last update: 5.2.1 - 2023-02-09) - closes 04/2025 - 22.10 - ⬆️
kinetic
not a LTS, use the PPA for jammy. - 23.04 - ⬆️
Lunar Lobster
not a LTS, use the PPA for jammy. - 23.10 - ⬆️
Mantic
not a LTS, use the PPA for jammy. - 24.04 - ✅ LTS
noble
(last update: TODO) - closes XX/YY
I am unable to upload new changes, Ubuntu rejects them (date of the rejection: 12/02/2022) because the versions are ended/closed.
Rejected: impish is obsolete and will not accept new uploads.
Rejected: bionic is obsolete and will not accept new uploads.
Rejected: eoan is obsolete and will not accept new uploads.
-
On Ubuntu focal with PHP 8:
Error: Unknown named parameter $$dbi
, apply the fix: https://github.com/phpmyadmin/phpmyadmin/issues/18498#issuecomment-1592981344 -
no 2FA (U2F now is supported) on the APT version due to missing packages into Debian, see https://github.com/phpmyadmin/phpmyadmin/issues/16779#issuecomment-1355352295
-
White screen error on some Ubuntu versions due to a symfony package missing PHP 8 support, see https://github.com/phpmyadmin/phpmyadmin/issues/17585#issuecomment-1196750348 to fix it. More about this in https://github.com/phpmyadmin/phpmyadmin/issues/17523
-
White screen/Error 500 when you use an older PHP version on Ubuntu 20 due to a packaging mistake, more on this situation here: https://github.com/phpmyadmin/phpmyadmin/issues/17523#issuecomment-1139443175
-
Fails to connect: "mysqli::real_connect(): (HY000/2002): Permission denied"
- One solution is: https://github.com/phpmyadmin/phpmyadmin/issues/16516#issuecomment-1527266762
- Or use the test script below at
/var/www/html/test.php
and delete it after testing !
-
Displays broken HTML code: https://github.com/phpmyadmin/phpmyadmin/issues/18306#issuecomment-1492695708
-
Displays PHP code: you are probably missing libapache2-mod-php or libapache2-mod-php8.2 to target a specific version
TODO by @williamdes, add this to FAQ: https://github.com/phpmyadmin/phpmyadmin/issues/18306#issuecomment-1492710905
test script
<?php
$servername = "127.0.0.1";// Also try "localhost"
$username = "root";
$password = "public";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
phpmyadmin (4:5.2.1+dfsg-3) unstable; urgency=medium
The phpMyAdmin package now requires PHP 8.2 to run,
this is the reflection of packaging complexities.
This will affect Debian packages and Ubuntu packages.
In 05/2023 the requirement for PHP 8.0+ was added to Ubuntu Jammy.
As of 04/2024, PHP 8.2 is now required.
Let me explain this to you:
Packages out of the scope of phpMyAdmin ship versions only compatible
with newer PHP versions and drop polyfills for older ones.
In a Debian version, the code of vendors is split into sub-packages
that each packaging team manages.
As a mater of fact security fixing is easier and you receive updates
from Debian security. Rather than waiting for phpMyAdmin to make
a new version that would include the vendor security fixed code.
Because of this packaging method the reality is split.
There is a Debian/Ubuntu reality with patches for Debian/Ubuntu
and the one from pure composer source code without any patch
that phpMyAdmin provides on it's website.
If you download the phpMyAdmin version from the website the PHP
version requirement will be different (the vendors are in the ZIP).
I hope you better understand why PHP 8.2 is required, to match the
version shipped by Debian.
The officially required PHP version for all packages in Debian.
If you have to maintain a legacy PHP version that is different from
the version shipped with Debian, the solutions are the following:
- Install multiple PHP-FPM versions
- Upgrade your existing code to a newer PHP version
- apt-get remove this package and install from the phpMyAdmin website
References:
- https://bugs.launchpad.net/bugs/2016016
- https://github.com/phpmyadmin/phpmyadmin/issues/17503
- https://github.com/phpmyadmin/phpmyadmin/issues/19092
-- William Desportes <williamdes@wdes.fr> Thu, 18 Apr 2024 00:41:31 +0200
Ref: (16065#issuecomment-609035410)
Example for: jammy
(LTS supported until 04/2025)
# Optionally cleanup old PPA versions
sudo rm -v /etc/apt/sources.list.d/phpmyadmin-ubuntu-ppa-*.list
# Add required packages
apt-get -y install apt-transport-https ca-certificates curl
# Fetch the GPG key and dearmor it
curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x42636ff8dae547240e01a1ca2ea3055293cb3f45" | sudo gpg --dearmor -o /usr/share/keyrings/phpmyadmin-ppa.gpg
# Add the source
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/phpmyadmin-ppa.gpg] https://ppa.launchpadcontent.net/phpmyadmin/ppa/ubuntu jammy main" > /etc/apt/sources.list.d/phpmyadmin-ubuntu-ppa-jammy.list'
# Update
apt update
# Check ("Version:" should contain "+jammy")
apt info phpmyadmin
# Install
apt install phpmyadmin
Ref: (15515#issuecomment-552211446)
# Install the "add-apt-repository" command
sudo apt-get install software-properties-common -y
# Add the phpMyAdmin PPA
sudo add-apt-repository ppa:phpmyadmin/ppa
# Update
apt update
# Check ("Version:" should contain "+jammy" or another name related to your Ubuntu version)
apt info phpmyadmin
# Install
apt install phpmyadmin
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
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
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
- https://help.ubuntu.com/community/phpMyAdmin (last checked: 03-2023 by @williamdes)
- https://doc.ubuntu-fr.org/phpmyadmin (last checked: quick check on 03-2023 by @williamdes)
Finally, you can always perform a manual installation.
Run an interactive container: docker run --rm -p 8091:80 -p 8092:443 -it ubuntu:jammy bash
apt update
apt upgrade -y
# 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"
Run an interactive container: docker run --rm -p 8091:80 -p 8092:443 -it debian:testing bash
apt update
apt upgrade -y
# Follow the instructions of "Install and test the package"
Run an interactive container: docker run --rm -p 8091:80 -p 8092:443 -it debian:sid bash
apt update
apt upgrade -y
# Follow the instructions of "Install and test the package"
# Install phpMyAdmin
apt install phpmyadmin -y
a2enmod ssl
a2ensite default-ssl
# Start apache2
service apache2 start
# Browse the page http://127.0.0.1:8091/phpmyadmin/ or https://127.0.0.1:8092/phpmyadmin/
# Advanced testing
apt install mariadb-server -y
# Or use https://mariadb.com/kb/en/mariadb-package-repository-setup-and-usage/
# 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');"
# -----------------------------------------------------
# Alternative syntaxes
# -----------------------------------------------------
# ALTER USER 'root'@'localhost' IDENTIFIED BY 'public';
# ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'public';
# CREATE USER 'test'@'%' IDENTIFIED BY 'public';
# GRANT ALL PRIVILEGES ON *.* TO 'test'@'%';
# FLUSH PRIVILEGES;
# -----------------------------------------------------
# Login on the page http://127.0.0.1:8091/phpmyadmin/
# Enjoy !
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
Popular destinations:
- Team meetings
- GSoC home
- Developer guidelines
- How to install on Debian and Ubuntu
- Issue and pull-request management
User resources: