Requirements
Before installing phpMyAdmin, ensure that you have a LAMP stack (Linux, Apache, MySQL, PHP) installed on your server. If not, follow a [LAMP setup guide.](https://)
Install phpMyAdmin
The simplest way to install phpMyAdmin is by using apt-get
:
sudo apt-get install phpmyadmin apache2-utils
During the installation, phpMyAdmin will guide you through basic configuration steps:
- Select Apache2 as the web server.
- Choose "YES" when asked to configure the database with
dbconfig-common
.
- Enter your MySQL password when prompted.
- Set the password you'd like to use for logging into phpMyAdmin.
Once the installation is complete, you need to add phpMyAdmin to the Apache configuration:
- Open the Apache configuration file:
sudo nano /etc/apache2/apache2.conf
- Add the following line at the end of the file:
Include /etc/phpmyadmin/apache.conf
Save and exit the file (Ctrl + O, Ctrl + X).
Restart Apache to apply the changes:
sudo service apache2 restart
You can now access phpMyAdmin by navigating to:
http://your_ip_address/phpmyadmin