Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
How to enable direct access to phpMyAdmin, skipping the Plesk login?
Answer
Direct access to phpMyAdmin can be enabled with the following steps.
Note: The database credentials are still required.
-
Log in to Plesk
-
Edit panel.ini, adding these lines to it
[databaseManagement]
features.phpMyAdmin.loginForm.enabled = on -
Log in to phpMyAdmin with the database credentials at https://example.com:8443/phpmyadmin
Note: Clear the browser cache and cookies if there are errors.
-
Create a domain from Domains > Add Domain (for example,
mysql.example.com
) -
Disable PHP support from Domains > mysql.example.com > PHP
-
Disable Proxy mode from Domains > mysql.example.com > Apache & nginx
-
Still in the Apache & nginx settings, add this code to Additional nginx directives
Note: Replace
example.com
with the hostname of the serverserver_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 information entered in panel.ini
is incorrect. Restore the original.
-
Rename the current
panel.ini
# mv /usr/local/psa/admin/conf/panel.ini{,.old}
-
Copy the original template
# cp /usr/local/psa/admin/conf/panel.ini.sample /usr/local/psa/admin/conf/panel.ini
-
Repeat the steps from the guide
Comments
1 comment
With a custom URL, the configuration works well... until the login page.
The page displays fine, but when you validate the login form, you get a 404 error.
In short, it's impossible to use a custom URL, only the server URL with /phpmyadmin at the end works.
Please sign in to leave a comment.