Introduction:
phpMyAdmin is a popular web-based graphical user interface (GUI) tool used for managing MySQL and MariaDB databases. If you’re running Ubuntu 22.04 and want to install phpMyAdmin, this step-by-step guide will walk you through the installation process.
Step 1: Update System Packages
- Open a terminal on your Ubuntu 22.04 system.
- Update the system packages to their latest versions by running the following command:
sudo apt update
Step 2: Install phpMyAdmin
- Install phpMyAdmin package by executing the following command:
sudo apt install phpmyadmin
2. During the installation process, you will be prompted to choose a web server to configure phpMyAdmin. Select the appropriate option for your setup (Apache or Nginx) by highlighting it and pressing Enter.
3. You will also be prompted to configure a database for phpMyAdmin to use. Choose ‘Yes’ and select either MySQL or MariaDB, depending on your preference. Enter the database administrative password when prompted.
4. Complete the installation process by following the on-screen prompts.
Step 3: Configure phpMyAdmin
- Open the Apache configuration file for phpMyAdmin using a text editor:
sudo nano /etc/apache2/conf-available/phpmyadmin.conf
2. Within the configuration file, you may need to adjust the AllowOverride
directive to All
to enable the use of .htaccess
files:
<Directory /usr/share/phpmyadmin> Options Indexes FollowSymLinks DirectoryIndex index.php AllowOverride All ...
3. Save the changes and exit the text editor.
4. Enable the phpMyAdmin Apache configuration by running the following command:
sudo ln -s /etc/apache2/conf-available/phpmyadmin.conf /etc/apache2/conf-enabled/
5. Restart the Apache web server for the changes to take effect:
sudo systemctl restart apache2
Step 4: Access phpMyAdmin
- Open a web browser and enter the following URL:
http://localhost/phpmyadmin
If you’re accessing phpMyAdmin from a remote machine, replace ‘localhost’ with the IP address or domain name of the Ubuntu 22.04 system.
2. You will be presented with the phpMyAdmin login page. Enter the database username and password to log in.
Conclusion:
By following the steps outlined in this article, you can easily install and configure phpMyAdmin on your Ubuntu 22.04 system. phpMyAdmin provides a convenient and user-friendly interface for managing your MySQL or MariaDB databases. Use it to perform various database operations, such as creating, modifying, and querying tables, as well as managing user privileges. Enjoy the benefits of this powerful tool to streamline your database administration tasks.