MySQL Server Settings
The MySQL Server Settings tab is where you configure how tenant databases are created and managed. You already set this up during installation, but let's dive deeper into what each option means.
Accessing MySQL Server Settingsโ
- Go to SaaS Management โ SuperAdmin Settings
- Click the MySQL Server Settings tab
MySQL Server Settings โ the foundation of your multi-tenant architecture
Settings Explainedโ
Database for Each Tenant (Shared Hosting Mode)โ
This is the most important architectural decision for your SaaS platform.
| Option | What It Does | When to Use |
|---|---|---|
| Yes (Recommended) | Each tenant gets their own isolated MySQL database | Production use, data isolation, security-conscious deployments |
| No | All tenants share a single database with prefixed tables | Testing, development, or if your hosting limits database creation |
Why "Yes" is recommended:
- Data isolation โ One tenant can never accidentally see another tenant's data
- Easy backups โ You can backup/restore individual tenants
- Better performance โ Smaller databases = faster queries
- Easy cleanup โ Deleting a tenant is as simple as dropping their database
Changing this setting after tenants are created is NOT straightforward. Choose carefully before your first tenant signs up. If you're unsure, go with Yes (separate database per tenant).
Use Subdir Structure "/ws/{tenant}"โ
| Option | URL Format | Requires |
|---|---|---|
| Yes | yoursite.com/ws/tenant-name | No additional DNS setup |
| No | tenant-name.yoursite.com | Wildcard DNS + web server config |
Choose based on your setup from the DNS Configuration guide.
I Have cPanelโ
| Option | What Happens |
|---|---|
| Yes | Module uses cPanel API to create databases and accounts |
| No | Module uses direct MySQL commands (requires root/admin MySQL user) |
MySQL Connection Detailsโ
| Field | Description | Default |
|---|---|---|
| MySQL Host | The hostname of your MySQL server | localhost |
| MySQL Port | The port MySQL is running on | 3306 |
| MySQL Root Username | Username with CREATE DATABASE privilege | varies |
| MySQL Password | Password for the above username | varies |
Verify Server Settingsโ
Always click "Click here to verify server settings" after making changes. This tests:
- Can the module connect to MySQL? โ
- Does the user have CREATE DATABASE privilege? โ
- Is the connection stable? โ
If verification fails, double-check your credentials and see Troubleshooting โ Installation Issues.
Best Practicesโ
- Use a dedicated MySQL user โ Don't use
rootin production. Create a specific user for the SaaS module. - Use strong passwords โ The MySQL password is stored in your server, so make it strong.
- Choose isolated databases โ Unless you have a specific reason, always use separate databases per tenant.
- Verify after every change โ Always click the verify button after changing any MySQL setting.
Settings saved? Move on to Tenant Settings to configure how registrations work.