Question
How to enable direct access to phpMyAdmin skipping phpMyAdmin login via Plesk URL? (Tools & Settings > Database Servers > Clicking on )
Answer
It is possible to enable direct access to phpMyAdmin over the URL link: https://plesk.example.com:8443/phpmyadmin
Note: The database user login and password are still required to log in phpMyAdmin.
Follow these steps to enable direct access to the phpMyAdmin login page:
-
Go to Extensions > My Extensions > Panel.ini Editor > Editor tab add the following lines in the Content section > then Click Save:
[databaseManagement]
features.phpMyAdmin.loginForm.enabled = on -
Access phpMyAdmin login page by browsing the following URL:
https://plesk.example.com:8443/phpmyadmin
Note: If the URL shows an error, clear the browser cache and cookies.
(Optional) In order to make the phpMyAdmin URL be like mysql.example.com
4a. Enable the ability the use the URL with iframe:
-
Go to the following folder path
/usr/local/psa/phpMyAdmin
(on Linux) , or%plesk_dir%phpmyadmin
(on Windows); -
Create or edit the file
config.inc.php
with a text editor; -
Add or change the value of the parameter
AllowThirdPartyFraming
and save the changes:<?php
declare(strict_types=1);
// ...
$cfg['AllowThirdPartyFraming'] = true;
4b. Log into Plesk;
4c. Go to Plesk > Domains and create a domain named mysql.example.com (replace example with the actual domain’s name);
4d. Go to mysql.example.com > Hosting Settings and set as follows its Hosting Type to Forwarding
4e. Set the other Destination Address to https://plesk.example.com:8443/phpmyadmin and Enable SSL support for it:4f. Issue an SSL certificate for the domain at Plesk > Domains > mysql.example.com > SSL/TLS Certificates.
-
The phpMyAdmin login page will appear. Log in with the database username and password:
Note: If the error “Cannot connect: invalid settings.” appears, restore the original panel.ini file or make sure that it is correct:
-
Rename the existing file panel.ini:
# mv /usr/local/psa/admin/conf/panel.ini{,.old}
-
Copy it from the template:
# cp /usr/local/psa/admin/conf/panel.ini.sample /usr/local/psa/admin/conf/panel.ini
-
Edit the file using vi and add the lines for 4. at the end:
# cat -n /usr/local/psa/admin/conf/panel.ini | tail -n 2
74 [databaseManagement]
75 features.phpMyAdmin.loginForm.enabled = onIt should look like the following in Panel.ini editor: