I’ve just installed a new installation of PMM2. The manual seems to have a lot of mistakes within it which don’t even match the Percona blogs on the product. The create pmm user does not appear to be supported by pmm-admin, (pmm-admin --help-long has no reference to it and the command as listed fails). I’ve got the client registration working and the Linux stats are appearing in pmm. However when trying to add a pmm user for mysql the command fails with access denied despite my ability to log into mysql with the username and password. Hopefully someone will be able to point out the error of my ways?
Hey there jemiss, thanks for reaching out on this. It’s a little troubling if the documentation isn’t working for you. I’ll see if I can get someone to help with your immediate issues and then we’d be happy to hear of any errors or faults that you’re finding too.
For bugs and errors (including in documentation) you are invited to raise a Jira report, and this way you will be able to more easily track how things progress and when fixes are available. The URL for that is https://jira.percona.com and on that first page you’ll find some useful tips on how to report issues.
Meanwhile, I will draw the attention of the PMM team to this question. Thanks!
Could you also update this post with a few more details e.g. are you new to PMM, is it an upgrade or are you trying a new install, what environment you’re installing into and so on.
One other thing… something that you said above has the team wanting you to check that you are accessing the right manual. The online version can be read here [URL]https://www.percona.com/doc/percona-monitoring-and-management/2.x/index.html[/URL] and you can download a pdf version from here. [URL]https://learn.percona.com/download-percona-monitoring-and-management-pmm-manual-2-0[/URL] … I just checked and both links will get you to the correct content.
Let me know? Thanks!
Hi. We previously were using PMM 1.17. We have installed on Centos 7 core with the docker image. Getting the server up and running was easy, although the documentation for attaching to prometheus was incorrect in the manual, but using the online documentation worked when pointing at the URL. We have two proxysql 2 (percona provided) nodes and they setup correctly and are reporting happily. It is getting our two PXC 5.7 clusters reporting in correctly which is causing the problems. We had the existing pmm user and so I am trying to use that account for the new pmm. I can log in to mysql with the account no problem but continually get error 1045 when trying to set up the client;
$ pmm-admin add mysql --username=pmm-mysql --password=password
Connection check failed: Error 1045: Access denied for user ‘pmm-mysql’@‘127.0.0.1’ (using password: YES).
$ pmm-admin add mysql --username=‘pmm-mysql’ --password=‘password’
Connection check failed: Error 1045: Access denied for user ‘pmm-mysql’@‘127.0.0.1’ (using password: YES).
$ pmm-admin add mysql --username=“pmm-mysql” --password=“password”
Connection check failed: Error 1045: Access denied for user ‘pmm-mysql’@‘127.0.0.1’ (using password: YES).
$ pmm-admin add mysql --username pmm-mysql --password password
Connection check failed: Error 1045: Access denied for user ‘pmm-mysql’@‘127.0.0.1’ (using password: YES).
$ pmm-admin add mysql --username ‘pmm-mysql’ --password ‘password’
Connection check failed: Error 1045: Access denied for user ‘pmm-mysql’@‘127.0.0.1’ (using password: YES).
$ pmm-admin add mysql --username ‘pmm-mysql’ --password ‘password’ 127.0.0.1:3306
Connection check failed: Error 1045: Access denied for user ‘pmm-mysql’@‘127.0.0.1’ (using password: YES).
$ pmm-admin add mysql --username=‘pmm-mysql’ --password=‘password’ 127.0.0.1:3306
Connection check failed: Error 1045: Access denied for user ‘pmm-mysql’@‘127.0.0.1’ (using password: YES).
documentation which I downloaded last week is for release 2.0.0 and has the date of September 18, 2019 on the cover sheet.
Some extra details:
page 37 which does not work
pmm-admin config --server-insecure-tls --server-address=:443
from your website (and also I’ve just found is also on page 41) - which does work:
pmm-admin config --server-insecure-tls --server-url=https://admin:admin@192.168.100.1:443
pmm-admin uninstall doesn’t work either:
]$ sudo pmm-admin uninstall --help
pmm-admin: error: expected command but got “uninstall”, try --help
Hello Jemiss,
Thank you for finding this.
I have created bugs for both PMM2 issues.
missing uninstall option : [URL][PMM-4777] pmm-admin uninstall --help pmm-admin: error: expected command but got "uninstall", try --help - Percona JIRA
missing --create-user option: [URL][PMM-4776] PMM2 Implement --create-user flag - Percona JIRA
As a workaround for missing --create-user create pmm user manually as follows,
Example:
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’;
pmm-admin add mysql --help
usage: pmm-admin add mysql [] [] []
pmm-admin add mysql ps5726 --query-source=slowlog --username=pmm --password=pass 127.0.0.1:5726
MySQL Service added.
Service ID : /service_id/02e7b7cb-2061-4e58-8953-0e83e75d14e9
Service name: ps5726
pmm-admin list
Service type Service name Address and port Service ID
MySQL ps5726 127.0.0.1:5726 /service_id/02e7b7cb-2061-4e58-8953-0e83e75d14e9
Hi Lalit
Currently nothing is listening on 5726 - does this create a specific service on that port?
Update:
I kept getting the following error after using
pmm-admin add mysql ps5726 --query-source=slowlog --username=pmm --password=pass 127.0.0.1:5726
Access denied for user ‘pmm’@‘127.0.0.1’ (using password: YES)
This worked for me.
Find mysql.sock
sudo mysqladmin variables |grep sock
pmm-admin add mysql --username=pmm --password= --server-insecure-tls --query-source=slowlog --socket=/var/lib/mysql/mysql.sock
Output:
MySQL Service added.
Service ID : /service_id/376fe4c0-…
Service name: -mysql
Table statistics collection enabled (the limit is 1000, the actual table count is 76).
I kept getting the following error after using
pmm-admin add mysql ps5726 --query-source=slowlog --username=pmm --password=pass 127.0.0.1:5726
Access denied for user ‘pmm’@‘127.0.0.1’ (using password: YES)
In My Example I was running MySQL on 5726 port, In your case, you need to replace user credentials along with the PORT on which your MySQL running then it will work. Please don’t use the example command as it is with the same credentials and port