Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-4776

PMM2 Implement --create-user flag

    XMLWordPrintable

    Details

      Description

      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 

      https://www.percona.com/doc/percona-monitoring-and-management/2.x/concepts/services-mysql.html#pmm-conf-mysql-user-account-creating

      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

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              roma.novikov Roma Novikov
              Reporter:
              lalit.choudhary Lalit Choudhary
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:

                  Smart Checklist