meow
meow

Reputation: 28164

Copying permissions from one mysql database to another

I would like to replicate the permissions from one database to another. Could that be done by simply copying the mysql table over?

Upvotes: 4

Views: 8908

Answers (2)

RobertPitt
RobertPitt

Reputation: 57268

You should take a look at this question on Server Fault.

Upvotes: 5

Mchl
Mchl

Reputation: 62387

Not really.

I think your best bet is to query information_schema tables (SCHEMA_PRIVILEGES, TABLE_PRIVILEGES, USER_PRIVILEGES) and use this data to create GRANT queries

See more here: http://dev.mysql.com/doc/refman/5.1/en/privilege-system.html

Upvotes: 1

Related Questions