Applicable to:
- Plesk for Linux
- Plesk for Windows
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:
CONFIG_TEXT: [databaseManagement]
features.phpMyAdmin.loginForm.enabled = on -
Access phpMyAdmin login page by browsing the following URL:
CONFIG_TEXT: 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.com4a. 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:CONFIG_TEXT: <?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:
Comments
12 comments
With Firefox the following link may also help:
https://<Plesk-server-host-name-or-IP>/domains/databases/phpMyAdmin/index.php?db=databasename
@Peter
I order to use this link it is required to log in to Plesk as 'admin' user first.
How to custom the phpmyadmin url port?
Can I specify the phpmyadmin port to 80?
Hello @Leon,
Thank you for your question.
Currently there is no possibility to customize the port for PHPMyAdmin.
As the feature that you have reported is yet to be implemented in Plesk, I suggest you to take part in our product improvement by referring to the following link: Customize port for PHPMyAdmin
Hey is it possible to get it work that all of the domains in plesk can have this /phpmyadmin serverAlias?
Hello @Melvin Seddig,
Thank you for you question.
Currently it is possible to access phpMyAdmin using Plesk server hostname or IP address only.
Can you tell me if i enable this option may i face any security problem?
Hello Shipon Karmakar
This won't bring any security issues, feel free to use this instruction.
Couple of things.
To access with plesk.yourdomain.com:8443/phpmyadmin you need to create an A record otherwise you get DNS errors
Omit plesk. and replace yourdomain with server IP, finally got me the phpMyAdming login page showiing and I could login.
However,
Is there a possibility to access phpMyAdmin server wide like WHM cPanel allows? That would be a great improvement because on one website I may have several databases and instead having to login logout login all the time, it would allow me to just choose the relevant database I need to work on, withing phpMyAdmin.
?
Thanks.
Hi JuJue Holistic Wellness,
To access all databases from a database server vía PHPMyAdmin, you must log in to Plesk and go to Tools & Settings > Database Servers, on the right side you have the button to open PHPMyAdmin as admin.
When logging in to phpMyAdmin directly, are failed logins logged anywhere?
@Jennifer Arsenault
Sure, the failed login attempt will appear in /var/log/secure on Red Hat based OSes, similar to:
phpMyAdmin[1500]: user denied: testuser (mysql-denied) from 127.0.0.1
Please sign in to leave a comment.