googlemagento

Secure phpMyAdmin

If you would like, add an additional layer of security by enabling Apache’s authentication when accessing phpMyAdmin. Follow these steps:

  • Edit the /opt/bitnami/apache/conf/bitnami/phpmyadmin.conf Apache configuration file for the phpMyAdmin application and add the following lines inside the Directory block:

     AuthType Basic
     AuthName phpMyAdmin
     AuthUserFile "/opt/bitnami/apache/users"
     Require valid-user
    
  • Change or set the phpMyAdmin access password using the following command and replacing PASSWORD with the new password:

      $ sudo /opt/bitnami/apache/bin/htpasswd -cb /opt/bitnami/apache/users administrator PASSWORD
    
  • Restart Apache to have the changes take effect:

      $ sudo /opt/bitnami/ctlscript.sh restart apache
    

Now, when accessing phpMyAdmin, users will be prompted to log in twice: first, with the username administrator and second, with the username root. The password for the first is the one set in the second step above. The password for the second can be obtained from the server launchpad or control panel.

Last modification February 9, 2023