Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

adnan12's avatar

How to Enable Automatic Tenant Database Creation with stancl/tenancy on Cloudways (VPS)

Hi, I need to configure automatic database-per-tenant creation using stancl/tenancy (Laravel) on Cloudways VPS, but encounter an Access denied error when the package tries to create databases. Error:

sql SQLSTATE[42000]: Access denied for user 'appuser'@'%' to database 'tenant_1'

0 likes
1 reply
martinbean's avatar

@adnan12 Well the error message is telling you that user does not have privilege to create databases. So use a user that does.

Please or to participate in this conversation.