HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Does MySQL 5.5 support shared database with separate schema?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
sharedwithseparatedatabasemysqldoesschemasupport

Problem

I am developing a SaaS based product using MySQL 5.5 as the backend database. I want to keep shared database for all the tenants, but separate a database schema of each tenant. There would be a single database for all tenant but different schema for each tenant.

I am not sure whether MySQL does support it.

Your answer would help me a lot.

Thanks in advance!

Solution

My understandng of MySQL is that what they call a "database" is a schema on other db's. So the answer to your question is "yes" or "no" depending on the specifics you are asking. In fact "create schema" just maps to "create database" on MySQL.

So yes, you can do one schema per tenant but that is not any different on MySQL than one database per tenant. So not sure if that is a yes or no.

Context

StackExchange Database Administrators Q#25655, answer score: 3

Revisions (0)

No revisions yet.