Plesk

How to access phpMyAdmin shipped in Plesk without login to Plesk URL itself?

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:

  1. Log in to Plesk;

  2. Install the Panel.ini Editor extension

  3. 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

  4. 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

    1. Go to Plesk > Domains and create a domain named mysql.example.com (replace example with the actual domain's name);

    2. Go to Domains > mysql.example.com > Hosting Settings disable PHP support press OK to apply the settings

    3. Go to Domains > mysql.example.com > Apache & nginx Settings disable Proxy mode press Aplly to save the settings

    4. 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;
      }

  5. 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:

  1. Rename the existing file panel.ini:

    # mv /usr/local/psa/admin/conf/panel.ini{,.old}

  2. Copy it from the template:

    # cp /usr/local/psa/admin/conf/panel.ini.sample /usr/local/psa/admin/conf/panel.ini

  3. 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 = on

    It should look like the following in Panel.ini editor:

Additional Information

Database Management Tools

Exit mobile version