Ensure the user has access to the database. You can check by selecting the domain in Virtualmin, clicking the Webmin tab, selecting Servers (or Un-used modules), and then MySQL Database Server. Click the checkbox next to the database and then the User Permissions button at the bottom. If necessary select Create new user, or click the already existing user, and then select the necessary permissions. Set the host to localhost.
If the user has permissions please
contact support for assistance.