Installing PHPMyAdmin in Ubuntu may have problems or may cause problems after installation. If you are one of the people who faced problems after installing PHPMyAdmin, this article is for you. This article will explain Troubleshooting Common Issues with PHPMyAdmin On Ubuntu. If you intend to buy an Ubuntu VPS server, you can check out the packages offered on our website.
Table of Contents
What are the Common Issues with PHPMyAdmin on Ubuntu?
PHPMyAdmin is a free and open-source software tool written in PHP to handle the administration of MySQL over the web. It is responsible for controlling the database of your website and applications graphically. This tool supports a wide range of operations like managing databases, relations, tables, columns, indexes, permissions, users, etc on MySQL and MariaDB. You may encounter issues after installing PHPMyAdmin on Ubuntu that must be troubleshot.
PHPMyAdmin Not Working
One of the common errors with PHPMyAdmin on Ubuntu is PHPMyAdmin Not Working error. After you install PHPMyAdmin on Ubuntu, the link http://localhost/phpmyadmin/ may return a blank page. This error may be because you have not installed libapache2-mod-php.
To fix the error, just install it with the help of the following command:
sudo apt install libapache2-mod-php8.1
And reload the Apache using the command below:
sudo systemctl restart apache2
Then try to access PHPMyAdmin.
Also, this error may be due to the Apache server not running. So check if your apache is working well with the help of the following command:
sudo systemctl status apache2.service
PHPMyAdmin Access Denied for root User
When a user installs and configures a new MySQL, may face the “access denied for user ”@’localhost’ to database phpmyadmin’” issue.
This error usually appears for new MySQL installations when logging into PHPMyAdmin with the root user. You can solve this problem with the following steps.
To solve this problem, first access PHPMyAdmin with the root user. To do this, enter the following command:
mysql -u root -p
Modify the root user to be able to log into MySQL as root. This will enable access to the root:
Enter your password when prompted.
Now change the authentication method to log into MySQL as root as shown below:
ALTER USER 'password'@'localhost' IDENTIFIED WITH mysql_native_password BY 'insert_password';
This will change the password for the user root and sets the authentication method to mysql_native_password.
To exit from MySQL using the following command:
mysql> FLUSH PRIVILEGES;
Now restart Apache by entering the following command:
sudo service apache2 restart
Then test the root MySQL user to access PHPMyAdmin. To do this, open your browser and enter the following URL:
In this article, we explained troubleshooting common problems with PHPMyAdmin on Ubuntu. I hope you found this tutorial useful and that it helps you to troubleshoot common issues with PHPMyAdmin on Ubuntu. You can contact us in the Comments section if you have any questions or suggestions.