Not the answer you need?
Register and ask your own question!

pmm-admin add mysql - invalid username or password

I'm trying to add mysql monitoring:
sudo pmm-admin add mysql --query-source=perfschema --username=XXX --password=XXX --debug

Username/password are correct, I can login to mysql locally, to

But I always get: "Invalid username or password. Please check username and password."

Is there any special mysql role I need to add to the user? Or may be there's some firewall issue I'm not aware of?



  • StaterosStateros Contributor Current User Role Patron
    Hello, could you check your CREATE USER statement for pmm? PMM2 is sensitive for difference between localhost and
    For example my pmm_user statements are:
    CREATE USER pmm_user'@' IDENTIFIED BY pmm_password;
    GRANT SELECT, UPDATE, DELETE, DROP ON performance_schema.* TO pmm_user'@';
  • holalaholala Entrant Current User Role Novice
    Added these grants, still doesn't work. Debug output is the following:
    DEBUG 2019-12-04 13:26:11.438438107Z: POST /v1/management/MySQL/Add HTTP/1.1
    Host: XXX:443
    User-Agent: Go-http-client/1.1
    Content-Length: 291
    Accept: application/json
    Authorization: Basic YWRtaW46YWRtaW4=
    Content-Type: application/json
    Accept-Encoding: gzip


    DEBUG 2019-12-04 13:26:11.591946912Z: HTTP/1.1 401 Unauthorized
    Content-Length: 92
    Connection: keep-alive
    Content-Type: application/json
    Date: Wed, 04 Dec 2019 13:26:11 GMT
    Server: nginx

    {"code":16,"error":"Invalid username or password","message":"Invalid username or password"}

    DEBUG 2019-12-04 13:26:11.592128639Z: Result: <nil>
    DEBUG 2019-12-04 13:26:11.592170075Z: Error: &my_sql.AddMySQLDefault{_statusCode:401, Payload:(*my_sql.AddMySQLDefaultBody)(0xc000508480)}
    Invalid username or password. Please check username and password.
  • StaterosStateros Contributor Current User Role Patron
    As I can see you are Unauthorized on pmm-server side. You need to specify admin user and admin password from PMM Server on config stage.
    pmm-admin config generic best_db_name --server-insecure-tls --server-url=http://admin_user:admin_apssword&#64;
  • holalaholala Entrant Current User Role Novice
    Ok, I got this working! In PMM Inventory I can see MySQL service. But nothing is displayed in mysql dashboards :( Been trying to find next steps in online docs/blogs, but couldn't.
  • StaterosStateros Contributor Current User Role Patron
    could you share output of?
    pmm-admin list

    Also you can open url, but you should be logged in as admin.
    There you can find all connected agent to PMM Server and their status. It can provide more information.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.