DropVPS Team
Writer: Cooper Reagan
How to Install phpMyAdmin on Ubuntu 24.10

Table of Contents
First, make sure your package list is up-to-date:
sudo apt update && sudo apt upgrade -y
Next, install the LAMP stack if you haven’t already. phpMyAdmin needs Apache, PHP, and MySQL or MariaDB to work properly:
sudo apt install apache2 php libapache2-mod-php mysql-server php-mysql -y
Enable and start Apache and MySQL services:
sudo systemctl enable apache2
sudo systemctl start apache2
sudo systemctl enable mysql
sudo systemctl start mysql
Secure your MySQL installation:
sudo mysql_secure_installation
Install phpMyAdmin:
sudo apt install phpmyadmin -y
During installation, you’ll be asked to choose the web server. Select apache2 using the spacebar, then press Enter. Then you’ll be asked whether to configure a database for phpMyAdmin with dbconfig-common — select Yes and set a password for the phpMyAdmin database.
If you accidentally skipped Apache selection, you can manually link phpMyAdmin to Apache:
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin
sudo systemctl reload apache2
Make sure the PHP extensions are installed:
sudo apt install php-mbstring php-zip php-gd php-json php-curl -y
sudo phpenmod mbstring
sudo systemctl restart apache2
To enable user access to phpMyAdmin, you may need to configure MySQL user authentication. Log into MySQL:
sudo mysql -u root -p
And run the following:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpassword';
FLUSH PRIVILEGES;
EXIT;
Now, navigate to http://your_server_ip/phpmyadmin in your browser. You should see the phpMyAdmin login screen.
If you’re using a firewall like UFW, make sure to allow Apache:
sudo ufw allow in "Apache Full"
That’s it — phpMyAdmin should now be working on your Ubuntu 24.10 VPS. Need more VPS tips and setups? Keep exploring dropvps.com