How to install phpMyAdmin on Ubuntu 20.04?
Overview
Many customers need the functionalities that a DBMS like MySQL has to offer as they might not feel safe using the server simply through the MySQL client.
Users may communicate with MySQL using a website interface, thanks to phpMyAdmin. We'll go through how to set up phpMyAdmin on Ubuntu Linux 20.04 server, secure it, and then utilize it to safely manage your databases.
Prerequisites
There are certain prerequisites that need to be met before you begin.
A system installed with Ubuntu Linux 20.04 or later
LAMP stack configured on your Linux server
Knowledge of Linux CLI
Get Started
Step 1: Configuring phpMyAdmin
phpMyAdmin may be installed from the standard Ubuntu repositories using APT.
a. If you are a non-root user, use sudo command to upgrade the package index on your server:
b. Run the below command to install these packages onto your system. First, we have to install php (if not already installed) using the following command:
c. Use the following command to download package and start phpMyAdmin installation.
Important: If you have enabled Validate Password plugin for MySQL, you will encounter this error. In order to resolve this, you need to disable password for mySQL and try again.
Choose abort and do the following process after exit.
Now open MySQL in your terminal.
Or if you have set a password on MySQL then, use the following command:
Use this command to uninstall the password component to prevent it from being started.
Now exit your mysql client.
Run the installation command again.
Use this command to enable the password component again in MySQL.
d. To setup the mbstring PHP extension, type the following command:
e. You need to restart your Apache server by running the following command.
phpMyAdmin is installed and set up to pair with Apache. You now have to make sure that users in your MySQL have the permissions necessary for working with the application before you can log in and start working with your MySQL databases.
Step 2 : Initial Setup and User Authentication
a. To open phpMyAdmin in your browser, follow these steps to setup a password-based access by creating an account to login:-
b. Check access levels of existing accounts by using the below command:
c. To setup a password for root account, use the below commands.
Or if you have an older version try:
d. Now, check again the list of existing accounts to confirm.
e. Follow these steps for making a user for separate access to phpMyAdmin.
Or if you have a password setup use:
f. Type this command to create a user.
Again, if you have an older version try:
g. To grant suitable privileges to your user, type the following command:
h. After this you can exit MySQL and run phpMyAdmin in your browser.
i. To access phpMyAdmin interface from your browser, type your IP address, or your server's IP address, or your domain followed by /phpMyAdmin.
Conclusion
After it has been set up, your Ubuntu 20.04 server must now be prepared to use phpMyAdmin. Using this interface, you may do common tasks including deleting and altering present structures and data in addition to creating databases, users, and tables.
Last updated