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 Linux) In order to make the phpMyAdmin URL be like mysql.example.com
-
Go to Plesk > Domains and create a domain named mysql.example.com (replace example with the actual domain's name);
-
Go to Domains > mysql.example.com > Hosting Settings disable PHP support press OK to apply the settings
-
Go to Domains > mysql.example.com > Apache & nginx Settings disable Proxy mode press Aplly to save the settings
-
Under Additional nginx directives add the following code and press OK to apply the settings
Note: Replace plesk.example.com with the hostname of the server
server_tokens off;
location / {
proxy_pass https://example.com:8443/phpMyAdmin/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_read_timeout 1200s;
}
location /phpMyAdmin {
proxy_pass https://example.com:8443;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_read_timeout 1200s;
}
-
-
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: