Skip to content
  • Contact us: +34 944 58 06 58
  • Plesk Partner Program
  • Plesk Lifecycle Policy
  • Blog
  • Contact us
  • Plesk 360
  • Contact us: +34 944 58 06 58
  • Plesk Partner Program
  • Plesk Lifecycle Policy
  • Blog
  • Contact us
  • Plesk 360
  • Solutions
    By Role
    • Developers
    • Content Managers
    • Digital Agencies
    • IT Admins
    • Web Hosters
    • Hyperscalers
    • Developers
    • Content Managers
    • Digital Agencies
    • IT Admins
    • Web Hosters
    • Hyperscalers
    By Edition
    • Web Admin Edition
    • Web Pro Edition
    • Web Host Edition
    • Business & Collaboration
    • Plesk WP Edition
    • Web Admin Edition
    • Web Pro Edition
    • Web Host Edition
    • Business & Collaboration
    • Plesk WP Edition
    By Cloud
    • Amazon Web Services
    • Microsoft Azure
    • Alibaba Cloud
    • GCP Marketplace
    • Vultr
    • DigitalOcean
    • Linode
    • UpCloud
    • Amazon Web Services
    • Microsoft Azure
    • Alibaba Cloud
    • GCP Marketplace
    • Vultr
    • DigitalOcean
    • Linode
    • UpCloud
    Partner Program
    Exclusive discounts, benefits and exposure to take your business to the next level
    Become a partner
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    Explore Features
    • Everyone
    • Admins & Web Hosters
    • Developers
    • Designers & Agencies
    • Plesk Features
    • Everyone
    • Admins & Web Hosters
    • Developers
    • Designers & Agencies
    • Plesk Features
    Key Topics
    • SocialBee
    • WP Toolkit
    • Sitejet Builder
    • SEO Toolkit
    • Joomla! Toolkit
    • Plesk Premium Email
    • Plesk Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder
    • SEO Toolkit
    • Joomla! Toolkit
    • Plesk Premium Email
    • Plesk Email Security
    Feature Packs
    • Business & Collaboration
    • WP Pack
    • Hosting Pack
    • Power Pack
    • Language Pack
    • Business & Collaboration
    • WP Pack
    • Hosting Pack
    • Power Pack
    • Language Pack
    Featured Extension
    SocialBee
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • Extension
  • Pricing
  • Extensions
  • Help Center
  • More
    • Careers
    • Events
    • Plesk University
  • FREE TRIAL
  • Solutions
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder
      • SEO Toolkit
      • Joomla! Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • SocialBee
  • Pricing
  • Extensions
  • Help center
  • More
    • Careers
    • Events
    • Plesk University
    • Blog
    • Plesk Partner Program
    • Contact Us
  • FREE TRIAL
  • Solutions
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder
      • SEO Toolkit
      • Joomla! Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • SocialBee
  • Pricing
  • Extensions
  • Help center
  • More
    • Careers
    • Events
    • Plesk University
    • Blog
    • Plesk Partner Program
    • Contact Us
  • FREE TRIAL

Knowledge Base

How to reinstall phpMyAdmin in Plesk for Linux

 
backupcentosdatabasedatabasesdebian

Question

How to reinstall phpMyAdmin in Plesk?

Answer

  1. Connect to a Plesk server via SSH.

  2. Get the phpMyAdmin database name and MySQL username:

    Note: If the file /usr/local/psa/phpMyAdmin/config.plesk.php does not exist, move to step 7.

    • Database name

      # grep pmadb /usr/local/psa/phpMyAdmin/config.plesk.php | grep -v NOTE

      $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';

    • Username

      # grep controluser /usr/local/psa/phpMyAdmin/config.plesk.php | grep -v NOTE

      $cfg['Servers'][$i]['controluser'] = 'phpmyadmin';

  3. Check if the phpmyadmin database exists on the server:

    # plesk db "show databases like '%phpmy%'"
    +--------------------+
    | Database (%phpmy%) |
    +--------------------+
    | phpmyadmin         |
    +--------------------+

    Note: Databases with the names like phpmyadmin_XXXXXXXXXXXX are likely to be the customers' databases. Do not remove them.

    If it is, create a backup this database:

    # plesk db dump phpmyadmin > /root/phpmyadmin.sql

  4. Remove this database from MySQL:

    # plesk db "drop database phpmyadmin"

  5. Check if the phpmyadmin user exists in the mysql.user table:

    # plesk db "select User from mysql.user where User like '%phpmy%'"
    +------------------+
    | User       |
    +------------------+
    | phpmyadmin |
    +------------------+

    If it is, create a backup of the MySQL database:

    # plesk db dump mysql > /root/mysql`date +%F_%H.%M`.sql

    And remove this user:

    # plesk db "DROP USER 'phpmyadmin'@'localhost'"

  6. Restart MariaDB/MySQL:

    # systemctl restart mariadb

  7. Remove the phpMyAdmin package:

    • on CentOS/RHEL-based distributions

      # rpm -e --nodeps psa-phpmyadmin

    • on Debian/Ubuntu-based distributions

      # dpkg -r --force-depends psa-phpmyadmin

  8. Reinstall phpMyAdmin:

    # plesk installer update

    Note: If the "phpMyAdmin was configured without configuration storage in database" warning is shown during phpMyAdmin reinstallation, it means that either the phpmyadmin database or user have not been set up because they already exist in the system. Make sure the database and the user are deleted and then repeat the reinstallation.

 

If the steps above did not help

If after the above actions phpMyAdmin had no entries in the database or the file /usr/local/psa/phpMyAdmin/config.plesk.php is missing:

  1. Create the main configuration file from a sample file:

    # cp /usr/local/psa/phpMyAdmin/config.plesk.php.tpl /usr/local/psa/phpMyAdmin/config.plesk.php

  2. Edit it as follows:

    /* User used to manipulate with storage /
    $cfg['Servers'][$i]['controlhost'] = 'localhost';
    $cfg['Servers'][$i]['controlport'] = '';
    $cfg['Servers'][$i]['controluser'] = 'phpmyadmin';
    $cfg['Servers'][$i]['controlpass'] = '<password>';

    /
    Storage database and tables */
    $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
    $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
    $cfg['Servers'][$i]['relation'] = 'pma__relation';
    $cfg['Servers'][$i]['table_info'] = 'pma__table_info';

  3. Connect to MySQL:

    # plesk db

  4. Switch to the MySQL database:

    use mysql;

  5. Create a corresponding user:

    MariaDB [mysql]> CREATE USER 'phpmyadmin'@'localhost' IDENTIFIED BY '<password>';

    MariaDB [mysql]> GRANT ALL ON *.* TO 'phpmyadmin'@'localhost' with grant option;

  6. Create a corresponding database:

    MariaDB [mysql]> create database phpmyadmin;

 

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

You Are Always Safe When You Have an Up-To-Date Plesk Backup

Read More »

Plesk with Centralized Database and Network File System

Read More »

Recommended OSs for Plesk

Read More »
Knowledge Base

Unable to access phpMyAdmin in Plesk: Failed to store CSRF token in session! Probably sessions are not working properly

Read More »

A MySQL/MariaDB query executed in phpMyAdmin/PHP script fails when the ONLY_FULL_GROUP_BY SQL mode is configured

Read More »

Unable to start MySQL/MariaDB on a Plesk server: Cannot open tablespace table_name which uses space ID

Read More »

Cannot start MariaDB on Plesk server: the directory /var/lib/mysql is not empty, so initialization cannot be done

Read More »

Hosting Wiki

  • Server Redundancy
  • Linux Containers
  • Bare Metal Server
  • Backup
  • MySQL
  • PhpMyAdmin
  • phpPgAdmin
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • PHP
  • SQL
  • Plesk
  • SQL database
  • NoSQL Database
  • Web Server
  • DNS Server
  • SSH

Industry
Partners

industry-partner_ALIBABA
industry-partner_GOOGLEPARTNER
industry-partner_MICROSOFT
industry-partner_REDHAT-r2
industry-partner_ALIBABA
industry-partner_AUTOMATTIC
industry-partner_AWS
industry-partner_DIGITALOCEAN
industry-partner_SCALEWAY
Follow us:
Facebook Twitter Linkedin Youtube Github

COMPANY

About Plesk
Our Brand
Legal
Careers
Impressum

PRODUCT

Pricing 
Extensions
What’s new

KNOWLEDGE BASE

Documentation
Help Center
Migrate to Plesk
Contact Us
Hosting Wiki
Preview releases

PROGRAMS

Contributor Program NEW
Partner Program
Affiliate ProgramNEW

COMMUNITY

Blog
Forums 
Plesk University

First defaul

Company

About Plesk
Our Brand
Legal
Careers
Impressum

PRODUCT

Pricing 
Extensions
What’s new

KNOWLEDGE BASE​

Documentation
Help Center
Migrate to Plesk
Contact Us
Hosting Wiki
Preview releases

PROGRAMS​

Contributor Program NEW
Partner Program
Affiliate ProgramNEW

COMMUNITY​

Blog
Forums
Plesk University

Follow us:
Facebook Twitter Linkedin Youtube Github

© 2025 WebPros International GmbH. All rights reserved. Plesk and the Plesk logo are trademarks of WebPros International GmbH.

Managed with love with Plesk WP Toolkit