Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

How to troubleshoot slow performance of MySQL/MariaDB on a Plesk server?

 
cpudatabasedatabase serverdatabasesgithub

Question

How to troubleshoot slow performance of MySQL/MariaDB on a Plesk server?

Answer

Note: Database performance tuning is out of the scope of Plesk Free Technical Support. This serves as a general-purpose guide.

Plesk for Linux

  1. Log into Plesk

  2. Go to Tools & Settings > Performance Booster > Serverwide

  3. Once MariaDB appears (this may take around a minute), press show values to be optimized

  4. Press Apply

    Applying the changes will restart the database server. Make sure no long queries are ongoing first as MariaDB will need to finish all queries before it can restart.

  5. Monitor CPU usage.

    If CPU consumption increases again, consider reviewing the SQL code of a database that has slow queries.

  6. During a high level of CPU usage, find queries that are currently running and taking a lot of time:

    # plesk db "SHOW FULL PROCESSLIST"
    +-----+-------+-----------+------+---------+------+-------+-----------------------+
    | Id | User | Host | db | Command | Time | State | Info |
    +-----+-------+-----------+------+---------+------+-------+-----------------------+
    | 12 | admin | localhost | psa | Sleep | 6763 | | NULL |
    | 100 | admin | localhost | psa | Query | 0 | NULL | SHOW FULL PROCESSLIST |
    +-----+-------+-----------+------+---------+------+-------+-----------------------+
    2 rows in set (0.00 sec)

  7. Check the MySQL/MariaDB error logfile /var/log/mysqld.log for errors.

  8. Check RAM and free disk space:

    # free -h
    # df -h

  9. Find databases that cause slow MySQL/MariaDB performance by enabling the MySQL slow query log.

    Note: It is possible to see the list of processes currently being handled by the local MySQL/MariaDB server. To do so, log into Plesk and go to Tools & Settings > MySQL Process List (Beta) (under Assistance and Troubleshooting).
    Click a MySQL/MariaDB process to see its details: what queries are being processed and how much resources they consume.

  10. Analyze and optimize all tables in all databases:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqlcheck -uadmin --optimize --all-databases

  11. Install and run the mysqltuner utility. This utility will analyze the current MySQL/MariaDB server instance and provide recommendations for adjusting appropriate parameters.

    • Linux version is available at: https://github.com/major/MySQLTuner-perl

Plesk for Windows

  1. Connect to…

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

Plesk with Centralized Database and Network File System

Read More »

3 Things to Monitor in your WordPress Site

Read More »

Git Commands Cheat Sheet

Read More »
Knowledge Base

Unable to add MySQL/MariaDB/MSSQL database in Plesk: the option is missing

Read More »

 An operation fails in Plesk: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘X’ for key ‘PRIMARY’

Read More »

How to access the Plesk psa database in MySQL/MariaDB

Read More »

How to enable remote access to MySQL/MariaDB server in Plesk?

Read More »

Hosting Wiki

  • Django
  • GIT
  • Server Redundancy
  • Linux Containers
  • Google Cloud CDN
  • PostgreSQL
  • GitHub
  • Bare Metal Server
  • MySQL
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • MSSQL
  • MongoDB
  • SQL
  • Plesk
  • SQL database
  • NoSQL Database
  • Web Server
  • DNS Server
  • HTTP
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family