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

PMM MySQL user not deleted after pmm-client package removal.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: On Hold
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 1.15.0
    • Fix Version/s: None
    • Component/s: Documentation
    • Labels:

      Description

      After using pmm-admin add mysql:queries --create-user a MySQL pmm user is created:

       

      MySQL users before:

      [root@pmm-1 ~]# mysql -e "SELECT user, host FROM mysql.user"
      +------+-----------+
      | user | host      |
      +------+-----------+
      | root | 127.0.0.1 |
      | root | ::1       |
      |      | localhost |
      | root | localhost |
      |      | pmm-1     |
      | root | pmm-1     |
      +------+-----------+
      

      MySQL users after adding:

      [root@pmm-1 ~]# pmm-admin add mysql:queries --create-user
      OK, now monitoring MySQL queries from slowlog using DSN pmm:***@tcp(localhost:3306)
      
      [root@pmm-1 ~]# mysql -e "SELECT user, host FROM mysql.user"
      +------+-----------+
      | user | host      |
      +------+-----------+
      | pmm  | 127.0.0.1 |
      | root | 127.0.0.1 |
      | root | ::1       |
      |      | localhost |
      | pmm  | localhost |
      | root | localhost |
      |      | pmm-1     |
      | root | pmm-1     |
      +------+-----------+

      So, we see that pmm@localhost and pmm@127.0.0.1 users have been added. 

       

      After removing service:

      [root@pmm-1 ~]# pmm-admin rm mysql:queries
      OK, removed MySQL queries pmm-1 from monitoring.
      
      [root@pmm-1 ~]# mysql -e "SELECT user, host FROM mysql.user"
      +------+-----------+
      | user | host      |
      +------+-----------+
      | pmm  | 127.0.0.1 |
      | root | 127.0.0.1 |
      | root | ::1       |
      |      | localhost |
      | pmm  | localhost |
      | root | localhost |
      |      | pmm-1     |
      | root | pmm-1     |
      +------+-----------+

      The user is still there. After removing the package altogether:

      [root@pmm-1 ~]# yum -y remove pmm-client
      ...output trimmed...
      Removed:
        pmm-client.x86_64 0:1.8.1-1
      Complete!
      
      [root@pmm-1 ~]# mysql -e "SELECT user, host FROM mysql.user"
      +------+-----------+
      | user | host      |
      +------+-----------+
      | pmm  | 127.0.0.1 |
      | root | 127.0.0.1 |
      | root | ::1       |
      |      | localhost |
      | pmm  | localhost |
      | root | localhost |
      |      | pmm-1     |
      | root | pmm-1     |
      +------+-----------+

      Still there. I'm not sure if we want to remove it, since it might "break" other things, but at least would it make sense to document this somewhere?

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                agustin.gallego Agustín Gallego
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: