Hi Sam Chen , [LIST=1]
[]Can you paste the full line for pmm-admin add so we can see what options you’re passing?
[]Note that if you’ve included --create-user then mysqld_exporter will log into MySQL using the pmm user (as is your case) but with a new, random password. You can see this password with
pmm-admin show-passwords
[]Using this discovered password, can you log into MySQL with pmm user ?
[]Are you using tcp or socket, that needs to be included when you did step #1 above, the pmm-admin add command.
[/LIST]
Sam Chen , looking at your original error you are attempting to use socket, but the user doesn’t have privileges to log in:
pmm:***@unix(/var/lib/mysql/mysql.sock)
[LIST=1]
[]Consider using the root account (which should have GRANT option) to authenticate, along with the --create-user option so that pmm user will be created automatically with appropriate permissions
[]This will automatically set up pmm-client to use the pmm user appropriately (whether that is by socket or tcp port)
[*]My recommendation is to use this command line:
[/LIST]