How to set up phpMyAdmin with SSL/TLS encryption?

by hal.littel , in category: Third Party Scripts , a year ago

How to set up phpMyAdmin with SSL/TLS encryption?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by lew , a year ago

@hal.littel 

To set up phpMyAdmin with SSL/TLS encryption, follow these steps:

  1. Make sure you have SSL/TLS enabled on your web server. You will need an SSL certificate installed and configured.
  2. Locate the phpMyAdmin configuration file, typically named config.inc.php. This file is usually located in the phpMyAdmin installation directory.
  3. Open the config.inc.php file in a text editor and locate the following line: $cfg['Servers'][$i]['host'] = 'localhost'; Replace 'localhost' with the hostname or IP address of your MySQL server.
  4. Below the line you just modified, add the following lines: $cfg['Servers'][$i]['ssl'] = true; $cfg['Servers'][$i]['ssl_key'] = '/path/to/private_key.pem'; $cfg['Servers'][$i]['ssl_cert'] = '/path/to/certificate.pem'; Replace /path/to/private_key.pem with the file path to your private key, and replace /path/to/certificate.pem with the file path to your SSL certificate.
  5. Save the config.inc.php file and restart your web server.
  6. Access phpMyAdmin using the HTTPS protocol, for example: https://your-domain.com/phpmyadmin.


Now phpMyAdmin will use SSL/TLS encryption to communicate with your MySQL server.