-
Type:
New Feature
-
Status: Open
-
Priority:
Medium
-
Resolution: Unresolved
-
Affects Version/s: 2.0.0
-
Fix Version/s: None
-
Labels:
User story:
UI/UX:
Acceptance criteria PO
Out of scope: P
Suggested implementation: Team on grooming/pre-grooming**
How to test: Team on grooming
Details:
as per PMM2 documention
When adding a MySQL instance to monitoring, you can specify the MySQL server superuser account credentials. However, monitoring with the superuser account is not secure. If you also specify the --create-user option, it will create a user with only the necessary privileges for collecting data.
But for PMM2 pmm-admin flag '--create-user' is unknown.
# pmm-admin add mysql ps5726 127.0.0.1:5726 --username=msandbox --password=msandbox --query-source=slowlog --create-user pmm-admin: error: unknown long flag '--create-user', try --help
Workaround:
Create pmm user manually.
CREATE USER pmm@localhost IDENTIFIED BY 'pass' WITH MAX_USER_CONNECTIONS 10; GRANT SELECT, PROCESS, SUPER, REPLICATION CLIENT, RELOAD ON *.* TO 'pmm'@'localhost'; GRANT SELECT, UPDATE, DELETE, DROP ON performance_schema.* TO 'pmm'@'localhost';
Add the instance as follows using pmm user,
sudo pmm-admin add mysql --user pmm --password pass