Thanks for your replies. I have just tried the password method. First in the database: CREATE USER foo@localhost IDENTIFIED BY 'bar';
I left the unix_socket=OFF in my.cnf and monit was able to successfully verify the socket is available using the test: if failed unixsocket /tmp/mysql.sock protocol mysql username "foo" password "bar" timeout 90 seconds then restart Next I stopped mariadbd and removed unix_socket=OFF from my.cnf. After restarting mariadbd Monit was still working ok and found the socket available. So the problem seems to be testing the socket without the creation of a user under which Monit can log in. With the unix_socket plugin in mariadbd this just won't work. Checking my old server there's no anonymous connection allowed to the database. But it also lacks the unix_socket authentication plugin. With that combination Monit reports that the socket is available ok (although I can understand that it's probably doing little more than checking it exists). On the new server and with the unix_socket plugin Mariadb must see the attempted anonymous login and fall through to the unix_socket authentication check which then gives a definite 'No', causing the Monit test to fail. Definitely some gotchas here! But I can't blame the Debian Monit maintainer - my monitrc file is pretty much unchanged for over 20 years on a different system. Many thanks, David
