When disabling and re-enabling a domain the MySQL user for that domain refuses to work. In order to fix it I have login to MySQL and set a new password with an ALTER statement. This is on a vanilla Ubuntu 18.04 server deployed with virtualmin's install.sh method. I can reproduce this problem on all domains on this server so it's not an isolated case. The MySQL version on the server is 5.7.
I've also made a forum topic about this but I thought a bug report would be more appropriate for this case.