Running pmm-admin add mysql:metrics --create-user --port on multi-instance environments will overwrite configuration file with new MySQL password and break access to old instances

Description

If a configuration file already exists that contains a MySQL username/password, and user attempts to execute:

pmm-admin add mysql:metrics --create-user --port

We should pause, and throw warning message:

Password already defined for user 'pmm', if you continue you will be generating a new password that may break access to MySQL and require manual intervention. If you'd like to continue, execute with --force

Or something to this effect. This can be duplicated for any environment that is running more than one instance of MySQL - perhaps on different ports (MySQL::Sandbox). Each time you execute with --create-user you define a new password which is stored to the configuration file, so earlier executions are overwritten.

Until this improvement is released, the workaround for users is to check the password:

pmm-admin show-passwords

And ensure that all locally running instances are configured for the same password.

How to test

None

How to document

None

Smart Checklist

Activity

Michael Coburn October 16, 2018 at 6:09 PM

Will be fixed in Agentless

Kenny Gryp March 15, 2017 at 10:31 PM

The Managed Services Platform monitors all RDS servers from a single host (the monitoring host) with pmm-admin. This is important for us.

Done

Details

Assignee

Reporter

Priority

Components

Labels

Smart Checklist

Created March 15, 2017 at 8:16 PM
Updated October 9, 2019 at 6:18 PM
Resolved October 9, 2019 at 6:18 PM

Flag notifications