A multi-tenant database is a database that serves multiple clients, or tenants, who share the same database schema but have separate data sets. One way to achieve data isolation for each client is to create a separate MySQL database for each tenant.
Some advantages of this approach are:
- It allows for easy backup and restore of individual tenant data.
- It simplifies the database administration and maintenance tasks, as each database can be managed independently.
- Scaling is easily achieved by adding more database servers and distributing tenant databases across them.
This approach requires a large number of tables on each server.
Combined with the default value of
innodb_file_per_table=ON, this results in a large
number of files that affects crash …