0

I am trying to migrate a database from one cluster to another cluster. In order to avoid any data loss during the migration, I am trying to lock my database with the WRITE operations. But the lock command from mysql doc

mysql> FLUSH TABLES WITH READ LOCK;
mysql> SET GLOBAL read_only = ON;

will lock the entire database which means this will lock other databases which I don't own and I don't want to lock other databases. Is there a way to lock only specific databases on a shared mysql instances.

Thanks

1
  • Just revoke any user accounts that have write access to the database in question.
    – EEAA
    Nov 3, 2015 at 22:31

1 Answer 1

0

Take a look at LOCK TABLES. You will need to list all tables in the database, but it should do what you expect.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .