BCE-C712 Linux System Administration

0 of 74 lessons complete (0%)

Web Services and Databases

Installing GUI phpMyAdmin for MYSQL Management

You don’t have access to this lesson

Please register or sign in to access the course content.

CentOS 8:

  1. Install phpMyAdmin:
sudo dnf install epel-release 
sudo dnf install phpmyadmin

During the installation, you will be prompted to configure phpMyAdmin with the web server. Choose the web server you are using (e.g., apache) and confirm the configuration.

  1. Edit the phpMyAdmin configuration file:
sudo nano /etc/httpd/conf.d/phpMyAdmin.conf

Replace nano with your preferred text editor if it’s different.

Make sure the following lines are present and adjust them if needed:

Alias /phpMyAdmin /usr/share/phpMyAdmin 
Alias /phpmyadmin /usr/share/phpMyAdmin 
<Directory /usr/share/phpMyAdmin/> 
    AddDefaultCharset UTF-8 
    Require all granted 
</Directory>
  1. Restart Apache:
sudo systemctl restart httpd

Now, you should be able to access phpMyAdmin by visiting http://your_server_ip/phpMyAdmin in your web browser.

Ubuntu 20.04:

  1. Install phpMyAdmin:
sudo apt update 
sudo apt install phpmyadmin

During the installation, you will be prompted to configure phpMyAdmin with the web server. Choose the web server you are using (e.g., apache2) and confirm the configuration.

  1. Enable the phpMyAdmin Apache configuration:
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf 
sudo a2enconf phpmyadmin
  1. Restart Apache:
sudo systemctl restart apache2

Now, you should be able to access phpMyAdmin by visiting http://your_server_ip/phpmyadmin in your web browser.

Remember to replace your_server_ip with the actual IP address or domain of your server. Additionally, ensure that your firewall allows traffic on the necessary ports (e.g., port 80 for HTTP) to access phpMyAdmin.