[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unixsocket test of MariaDB (mysql) with unix_socket authentication p
From: |
Lutz Mader |
Subject: |
Re: unixsocket test of MariaDB (mysql) with unix_socket authentication plugin installed |
Date: |
Thu, 25 Jul 2024 11:44:39 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
Hello David,
a question, have you done tests with an additional username and password
to authenticate the socket used in the test?
> https://mmonit.com/monit/documentation/monit.html#MYSQL
Sorry a question only,
Lutz
Am 25.07.24 um 01:25 schrieb David Fletcher:
> Hi,
>
> After tracing an issue that was preventing Monit correctly monitoring
> MariaDB, would a small update in the Monit manual be possible? I've
> found this while updating an old installation on which the following
> entry within a MySQL monitoring section worked perfectly:
>
> if failed unixsocket /tmp/mysql.sock protocol mysql timeout 90 seconds
> then restart
>
> On a new installation with MariaDB version 10.11.3 on Raspbian 12 (based
> on Debian 12), Monit (version 5.33.0) kept reporting that MariaDB could
> not be started. Actually it was being started and then restarted
> generating a mess, because Monit could not connect to the unix socket.
>
> I found that disabling the unixsocket test enabled startup. But the cause
> is that MariaDB 10.4.3 and later have a unix_socket authentication
> plugin installed by default. This aims to check if the unix user
> connecting to the socket has been granted permission on the database
> resource they are trying to access.
>
> Whether Monit's connection would succeed if I created a MariaDB grant
> for the unix user Monit runs under I don't know. But I found it was
> simpler to disable this plugin by inserting unix_socket=OFF into the
> [maraidbd] section of /etc/mysql/my.cnf.
>
> Since Ubuntu 15.10 based on Debian 9 this unix_socket authentication has
> been a default so probably it's catching many people out. Could
> something about this be added to the manual page to alert people to this
> issue and work-around?
> https://mmonit.com/monit/documentation/monit.html#MYSQL
>
> Best regards, David.
>
>