Install phpMyAdmin on Ubuntu 20.04 / 22.04 (How To). In this article, we explore what phpMyAdmin is, its key features, and the benefits it brings to your work. We then learn how to install phpMyAdmin on Ubuntu.
If you’re a web developer or a database administrator, you’ve probably heard of phpMyAdmin. But what exactly is it, and what it does? Well, phpMyAdmin is the most popular tool for MySQLdatabase management. Also, the most trusted database used for web applications and programs.
Well, let’s start with article Install phpMyAdmin on Ubuntu 20.04 / 22.04 (How To).
In addition, it provides a user friendly interface that lets you create and modify databases, tables, fields, and other database objects, run SQL queries, and manages users and permissions. Moreover, it manages indexes, users, and permissions in addition to running SQL queries and browsing data.
phpMyAdmin is written in PHP for web hosting services and runs on a web server, such as Apache or Nginx. Available for download from the official website. You can install it on a local server or a hosting account.
phpMyAdmin has a wide range of features that make it a powerful and versatile tool for database management. Some of the key features include:
Database management: With phpMyAdmin, you create, alter, and drop databases, tables, fields, and other database objects. You also import and export data from and to various formats, such as CSV, SQL, and XML.
SQL query editor: phpMyAdmin includes an SQL query editor that lets you run queries, view the results, and save them for later use. The editor also supports syntax highlighting, autocompletion, and query history.
User and permissions management: You create, alter, and delete users and manage their permissions with phpMyAdmin. You also set global privileges and assign specific privileges to individual users or groups. It manages all user level permissions.
Server administration: With phpMyAdmin, you view and manage server variables and status, optimize and repair tables, and monitor the server’s performance. What is more, you also set up replication and configure the server’s security.
Visualization and reporting: phpMyAdmin include several visualization and reporting tools that allow you to view and analyze your data in various formats, such as graphs, charts, and pivot tables.
Search Option: It is the most important feature of the tool. The Search option helps the user to have a look at the whole database system and the nodes connected to it when the user presses a key to search for the content.
Easy to use: One of the best advantages of phpMyAdmin is its user friendly interface. Even if you’re new to database management, you’ll be able to navigate through the tool easily. It comes with a visual representation of the database structure, which makes it easy to understand and use.
Supports multiple languages: phpMyAdmin supports multiple languages, which makes it accessible to users all over the world. This feature helps you work with a team of people who speak different languages.
Offers a range of features: In addition to the database management features, phpMyAdmin has several advanced features such as importing and exporting data, backing up and restoring databases and running SQL queries. These features make it a powerful tool for managing and maintaining databases.
Customizable: Another advantage of phpMyAdmin is that it is customizable to suit your specific needs. Simply choose which features you want to enable, and even add your custom plugins to increase efficiency.
Widely used: phpMyAdmin is a widely used tool, which means you’ll find a wealth of resources and support online. Whether you’re looking for tutorials, tips, or answers to specific questions, you’ll be able to find what you’re looking for.
Up next we learn how to Install phpMyAdmin on Ubuntu 20.04 / 22.04.
phpMyAdmin is used to manage MariaDB and MySQL databases via a web browser. So, you will need to install the MariaDB server on your system. Please install it using the following command.
apt install mariadb-server mariadb-client -y
After the successful installation, secure the MariaDB installation and set a root password with the following command.
mysql_secure_installation
Answer all the questions as shown below:
Enter current password for root (enter for none): Press ENTER.
Switch to unix_socket authentication? Press N, then ENTER.
Change the root password? Press Y and set your password, then ENTER.
Remove anonymous users? Press Y, then ENTER.
Disallow root login remotely? Press Y, then ENTER.
Remove test database and access to it? Press Y, then ENTER.
Reload privilege tables now? Press Y, then ENTER.
After securing the MariaDB installation, log in to the MariaDB console as a root user.
mysql -u root -p
Once you are logging in to the MariaDB console, create a database and user with the following command.
CREATE DATABASE myadmin;
CREATE USER 'myadmin'@'localhost' IDENTIFIED BY 'password';
Next, grant all the privileges to myadmin database with the following command.
GRANT ALL ON myadmin.* TO 'myadmin'@'localhost';
Then, flush the privileges and exit from the MariaDB console with the following command.
Step 4 - Create an Apache Virtual Host for phpMyAdmin
Now, you need to create an Apache virtual host configuration file to host phpMyAdmin using the Apache server. Create an Apache virtual host using the following command.
nano /etc/apache2/conf-available/phpmyadmin.conf
Add the followig configuration.
Alias /phpmyadmin /var/www/html/phpmyadmin
AddDefaultCharset UTF-8
Require all granted
Require all granted
Save and close the file then activate the Apache virtual host using the following command.
a2enconf phpmyadmin.conf
Next, restart the Apache service to apply the configuration changes.
At this point, the phpMyAdmin is installed and configured on your server. Access it using the URL http://your_server_ip/phpmyadmin. You should see the phpMyAdmin login page.
Provide your database username, password and click on the Login button. You should see the phpMyAdmin dashboard on the following page.
Thank you for reading Install phpMyAdmin on Ubuntu 20.04 / 22.04 (How To). We will conclude this article blog.
Install phpMyAdmin on Ubuntu 20.04 / 22.04 (How To) Conclusion
In this post, we explained how to install phpMyAdmin with Apache on Ubuntu 20.04 / 22.04. Finally, you can now create, delete and manage databases and run any query via the phpMyAdmin web interface.
Overall, phpMyAdmin is a powerful and versatile tool essential for managing and maintaining a MySQL database. The tool is used by several developers and database managers worldwide due to its friendly user interface and wide range of customizable features. Whether you’re a beginner or an experienced user, you’ll find that phpMyAdmin is an invaluable tool for managing and maintaining your databases.
Explore more of our Apache content in our blog by navigating over here.
I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.