Percona Monitoring and Management (PMM) is an open-source platform that provides deep visibility into MySQL, MariaDB, PostgreSQL, and MongoDB performance — including query analytics, slow-query identification, and time-series dashboards — without requiring a commercial licence. Running PMM Server as a Docker container keeps the server component isolated and easy to upgrade, while the lightweight PMM Client daemon runs directly on your RHEL 8 database host. This tutorial covers the full deployment path from an empty RHEL 8 server to a working PMM dashboard streaming live MySQL metrics.

Prerequisites

  • RHEL 8 server (or AlmaLinux 8 / Rocky Linux 8) with at least 2 GB RAM and 10 GB free disk space
  • MySQL 5.7 or 8.0 running on the same host (or a reachable host on the same network)
  • Docker and Docker Compose installed (dnf install -y docker-ce from the Docker CE repo, or podman-docker)
  • Ports 443 and 9000 accessible for the PMM Server UI
  • Root or sudo access and the Percona repository configured

Step 1 — Start PMM Server as a Docker Container

PMM Server bundles Grafana, Prometheus, VictoriaMetrics, and the PMM API into a single Docker image. Use a named volume so your data survives container restarts and upgrades.

docker volume create pmm-data

docker run -d 
  --name pmm-server 
  --restart always 
  -p 443:443 
  -p 80:80 
  -v pmm-data:/srv 
  percona/pmm-server:2

Wait 30–60 seconds for the container to initialise, then open https://<your-server-ip> in a browser. Accept the self-signed certificate warning and log in with the default credentials admin / admin. You will be prompted to set a new password on first login.

Step 2 — Add the Percona Repository and Install PMM Client

The PMM 2 client package is distributed through Percona’s own dnf repository. Install the repository release package first, then install pmm2-client.

sudo dnf install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm
sudo percona-release setup pmm2-client
sudo dnf install -y pmm2-client

pmm-admin --version

Step 3 — Connect the PMM Client to PMM Server

Register the client with the PMM Server using pmm-admin config. Replace PMM_SERVER_IP with the IP or hostname of the host running the PMM Server container. The --server-insecure-tls flag accepts the self-signed certificate; in production replace this with a properly signed certificate and remove the flag.

sudo pmm-admin config 
  --server-insecure-tls 
  --server-url=https://admin:yourpassword@PMM_SERVER_IP:443

A successful connection returns Checking local pmm-agent status... OK followed by Registering pmm-agent on PMM Server... OK.

Step 4 — Create a MySQL Monitoring User

PMM needs a MySQL account with the appropriate privileges to collect metrics and query digests from the Performance Schema.

mysql -u root -p <<'EOF'
CREATE USER 'pmm'@'localhost' IDENTIFIED BY 'pmm_strong_pass' WITH MAX_USER_CONNECTIONS 10;
GRANT SELECT, PROCESS, REPLICATION CLIENT, RELOAD, BACKUP_ADMIN ON *.* TO 'pmm'@'localhost';
FLUSH PRIVILEGES;
EOF

Step 5 — Add the MySQL Service to PMM

Use pmm-admin add mysql to register the local MySQL instance. The --query-source=perfschema option collects query analytics from the Performance Schema (MySQL 8.0 default) rather than the slower log file.

sudo pmm-admin add mysql 
  --username=pmm 
  --password=pmm_strong_pass 
  --query-source=perfschema 
  --service-name=mysql-primary 
  localhost:3306

sudo pmm-admin list

The output of pmm-admin list should show the MySQL service with a Running status for both the mysql and mysql-perfschema agents.

Step 6 — Explore the PMM Dashboards

Return to the PMM UI at https://<PMM_SERVER_IP>. Navigate to MySQL → MySQL Overview to see connection counts, InnoDB buffer pool utilisation, query throughput, and per-table I/O statistics. The Query Analytics section (top-left menu) shows the top queries sorted by latency or execution count, along with example EXPLAIN plans.

# Verify all agents are sending data
sudo pmm-admin status

# List all monitored services
sudo pmm-admin list

# Check pmm-agent logs if metrics are missing
sudo journalctl -u pmm-agent -f

Conclusion

You have deployed PMM Server as a Docker container on RHEL 8, installed and registered the PMM 2 Client, created a least-privilege MySQL monitoring account, and confirmed that metrics and query analytics are flowing into the Grafana dashboards. PMM’s out-of-the-box alert rules can be enabled under Alerting → Alert Rules to notify you of replication lag, high connection counts, or slow queries without any additional configuration.

Next steps: Adding PostgreSQL Monitoring to PMM, Configuring PMM Alerting with PagerDuty, and Upgrading PMM Server with Zero Downtime.