jmhostalet
jmhostalet

Reputation: 4639

How can I define a schema in MySQL as a subset of another schema

I have a MySQL schema with 20 tables, two applications are using it, the first one is using all the tables but the second only 10.

How can isolate the tables in such a way that the second app only "see" 10 tables?

I was thinking about using a second schema and synonyms to the tables of the first schema, but MySQL does not support synonyms.

It's all about documentation, it is not a security concern.

How can I proceed?

Upvotes: 0

Views: 81

Answers (1)

Eugen Rieck
Eugen Rieck

Reputation: 65304

MySQL easily allows you to grant privileges on only some tables to one user, while granting privileges to all tables to another user.

So I recommend simply using ACL granularity to hide the unwanted tables from each application.

Upvotes: 1

Related Questions