[WordPress on VPS] How To Install and Uninstall phpMyAdmin on Ubuntu

phpMyAdmin is a GUI-based web app to manage your MySQL databases. It’s a very powerful tool to have but it’s also an unnecessary component that you don’t need to use if you are familiar with MySQL basic commands. What’s better, since it’s easy to put on and remove you can quickly install it when needed and uninstall it when finished.

phpMyAdmin

How to install phpMyAdmin

Run the following commands first,

sudo apt-get update
sudo apt-get install phpmyadmin

During the installation, phpMyAdmin will walk you through a basic configuration. Select apache2 as the web server when prompted.

phpMyAdmin - installation - web server

Choose <Yes> when asked to configure database for phpMyAdmin with dbconfig-common.

phpMyAdmin - installation - config

Then put in the password for the MySQL database and password for phpMyAdmin.

That’s all you need to do.

Now, go to http://domain/phpmyadmin to access it. Use your MySQL credentials to log in.

phpMyAdmin

How to uninstall phpMyAdmin

Once you’ve done your work, you can simply remove it from the server by running the following commands.

sudo dpkg -P phpmyadmin
sudo rm -f /etc/apache2/conf.d/phpmyadmin.conf
sudo service apache2 restart

Select <Yes> when asked to deconfigure database for phpMyAdmin with dbconfig-common.

phpMyAdmin - remove

And <Yes> again when asked to purge the database for phpMyAdmin.

phpMyAdmin - purge database

And done.

Leave a Reply

Your email address will not be published. Required fields are marked *