Skip to main content

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โ€‹

  1. Go to SaaS Management โ†’ SuperAdmin Settings
  2. 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.

OptionWhat It DoesWhen to Use
Yes (Recommended)Each tenant gets their own isolated MySQL databaseProduction use, data isolation, security-conscious deployments
NoAll tenants share a single database with prefixed tablesTesting, 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
danger

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}"โ€‹

OptionURL FormatRequires
Yesyoursite.com/ws/tenant-nameNo additional DNS setup
Notenant-name.yoursite.comWildcard DNS + web server config

Choose based on your setup from the DNS Configuration guide.

I Have cPanelโ€‹

OptionWhat Happens
YesModule uses cPanel API to create databases and accounts
NoModule uses direct MySQL commands (requires root/admin MySQL user)

MySQL Connection Detailsโ€‹

FieldDescriptionDefault
MySQL HostThe hostname of your MySQL serverlocalhost
MySQL PortThe port MySQL is running on3306
MySQL Root UsernameUsername with CREATE DATABASE privilegevaries
MySQL PasswordPassword for the above usernamevaries

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โ€‹

  1. Use a dedicated MySQL user โ€” Don't use root in production. Create a specific user for the SaaS module.
  2. Use strong passwords โ€” The MySQL password is stored in your server, so make it strong.
  3. Choose isolated databases โ€” Unless you have a specific reason, always use separate databases per tenant.
  4. Verify after every change โ€” Always click the verify button after changing any MySQL setting.
success

Settings saved? Move on to Tenant Settings to configure how registrations work.