MySQL authentication plugin warnings

Issue #988 duplicate
Peter Russell created an issue

Using the Monit MySQL authenticated check on PID with port 3306 and protocol shows MySQL warnings as follows:

Plugin sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'

Using the Monit MySQL authenticated check on socket with a MysQL v8 server does not work at all and causes monit to see service as failed.

Comments (6)

  1. Tildeslash repo owner

    The caching_sha256_password support was added in Monit 5.27.0 … please can you check your monit version?

  2. Peter Russell reporter

    Hi - Monit is version 5.28.

    Is there some special flag required within the check to force the updated password mechanism?

    Monit check is currently configured as follows:

    check process mysqld with pidfile /var/run/mysqld/mysqld.pid
        group mysql
        start program = "/bin/systemctl start mysql"
        stop  program = "/bin/systemctl stop mysql"
        if failed
          host localhost
          port 3306
          protocol mysql username "monitmysqluser" password "mysqlpassword"
        then restart
    

  3. Tildeslash repo owner

    The auth plugin negotiation is automatic, monit implements only “caching_sha2_password” and “mysql_native_password” plugins.

    You can run monit in debug mode (-v option) to trace the mysql protocol.

  4. Peter Russell reporter

    Interesting - it doesn’t seem to be detecting the right plugin required.

    Verbose output from monit:

    [2021-06-28T08:07:13+0000] debug    : 'mysqld' process is running with pid 113690
    [2021-06-28T08:07:13+0000] debug    : 'mysqld' zombie check succeeded
    [2021-06-28T08:07:13+0000] debug    : Server wants mysql_native_password plugin
    [2021-06-28T08:07:13+0000] debug    : Will use mysql_native_password plugin
    [2021-06-28T08:07:13+0000] debug    : MySQL Server: Protocol: 10, Version: 8.0.23-14, Connection ID: 551, Capabilities: 0xcfffffff, AuthPlugin: mysql_native_password
    [2021-06-28T08:07:13+0000] debug    : MySQL handshake sent
    [2021-06-28T08:07:13+0000] debug    : MySQL QUIT sent
    [2021-06-28T08:07:13+0000] debug    : 'mysqld' succeeded testing protocol [MYSQL] at [localhost]:3306 [TCP/IP] [response time 3.321 ms]
    [2021-06-28T08:07:13+0000] debug    : 'mysqld' connection succeeded to [localhost]:3306 [TCP/IP]
    

  5. Log in to comment