4

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

meow
  • 27,476
  • 33
  • 116
  • 177

2 Answers2

5

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

Community
  • 1
  • 1
RobertPitt
  • 56,863
  • 21
  • 114
  • 161
1

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

Mchl
  • 61,444
  • 9
  • 118
  • 120