I have a remote MySQL server instead of using the local install on a virtualmin node, in fact the remote MySQL server is a MaxScale SQL Proxy with a cluster of MariaDB nodes in replication. The cluster of nodes and the MaxScale config have all be tested and function as expected.
If I manually create the mysql user / host combination then the virtualmin node can connect and operate as normal.
If Virtualmin is used to set up a user, either by adding a user with DB permissions or by adding the MySQL feature to a virtual server, then creation fails. Virtualmin tries to create a user as username@hostname (and the manually configured username@10%). Because I have enabled skip-name-resolve in the MySQL servers for increased performance the creation of username@hostname does not succeed on the MySQL server, and so the subsequent attempt to modify the password of that same user fails with the error:
MySQL database failed! : SQL set password for 'newtest'@'fqdn' = password('obfuscated') failed : Can't find any matching row in the user table at /usr/libexec/webmin/web-lib-funcs.pl line 1427
In the default server template
Allowed MySQL client hosts is set to
10.% as we run the MySQL cluster on private IPs and the Virtualmin nodes have an interface on the private IP too.
So it seems that I can't find a way to prevent Virtualmin from wanting to add a duplicate user for the Virtualmin node hostname, which is unnecessary for our setup and is actually causing the error. Is there a way to prevent this default action and have Virtualmin create only the user@10.% specified in the default server template?