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

PMM2 pmm-admin don't have --create-user options

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: None
    • Component/s: Documentation
    • Labels:
      None
    • Story Points:
      0
    • Sprint:
      Platform Sprint 3

      Description

      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

       

      TODO: remove `--create-user` from doc and make sure we have the command for creating user ^

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              lalit.choudhary Lalit Choudhary
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 40 minutes
                  40m

                    Smart Checklist