To set up phpMyAdmin, follow these steps:
1. Install phpMyAdmin and Apache web server, if not already installed:
sudo apt-get update
sudo apt-get install phpmyadmin apache2
2. Enable the PHP module for Apache:
sudo phpenmod mbstring
3. Restart Apache:
sudo systemctl restart apache2
4. In Ubuntu a link will automatically be created, though in many other Linux or UNIX distributions you'll need to create a symbolic link to phpMyAdmin in the Apache web root directory. An example of how to do this is as follows:
sudo ln -s /usr/share/phpmyadmin/ /var/www/html/phpmyadmin
5. Now the installation is complete, you should be able to open your web browser and navigate to http://localhost/phpmyadmin.
Log in using your MySQL or MariaDB credentials.
Note: You may need to modify the Apache configuration file, /etc/phpmyadmin/apache.conf, if you encounter any issues with the setup.
Discussion