Skip to content

Commit

Permalink
improved password security references for PMM2 (#3539)
Browse files Browse the repository at this point in the history
* improved password security references for PMM2

* typo
  • Loading branch information
catalinaadam authored Jan 31, 2025
1 parent b3f0760 commit 0af1509
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions documentation/docs/setting-up/client/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,27 @@ Check that:

## Create a database account for PMM

It is good practice to use a non-superuser account to connect PMM Client to the monitored database instance. This example creates a database user with name `pmm`, password `pass`, and the necessary permissions.
For security, connect PMM Client to your database using a dedicated monitoring user with limited permissions. This example creates a pmm user account that has just enough access to collect monitoring data without full administrative privileges.

!!! warning "Password security"
- Use a strong, unique password for the PMM database user
- At least 12 characters long
- Mix of uppercase and lowercase letters
- Include numbers and special characters
- Avoid common words or patterns
- Never use default, test, or example passwords in production

=== "MySQL 8.0"

```sql
CREATE USER 'pmm'@'127.0.0.1' IDENTIFIED BY 'pass' WITH MAX_USER_CONNECTIONS 10;
CREATE USER 'pmm'@'127.0.0.1' IDENTIFIED BY '<your_strong_password>' WITH MAX_USER_CONNECTIONS 10;
GRANT SELECT, PROCESS, REPLICATION CLIENT, RELOAD, BACKUP_ADMIN ON *.* TO 'pmm'@'127.0.0.1';
```

=== "MySQL 5.7"

```sql
CREATE USER 'pmm'@'127.0.0.1' IDENTIFIED BY 'pass' WITH MAX_USER_CONNECTIONS 10;
CREATE USER 'pmm'@'127.0.0.1' IDENTIFIED BY '<your_strong_password' WITH MAX_USER_CONNECTIONS 10;
GRANT SELECT, PROCESS, REPLICATION CLIENT, RELOAD ON *.* TO 'pmm'@'127.0.0.1';
```

Expand Down
2 changes: 1 addition & 1 deletion documentation/overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% extends "base.html" %}

{% block announce %}
PMM 2 is no longer actively developed. We recommend using PMM 3 for improved features and better performance.</strong>.
PMM 2 is no longer actively developed. We recommend using PMM 3 for improved features and better performance.</strong>
{% endblock %}

{% block scripts %}
Expand Down

0 comments on commit 0af1509

Please sign in to comment.