Lock MYSQL tables before exporting tables

 

  1. Ensure a consistent snapshot by executing this statement to lock the tables so that they cannot be modified during export:

    mysql> FLUSH TABLES hr.employees, hr.managers WITH READ LOCK;

    While the lock is in effect, the tables can still be used, but only for read access.

  2. Unlock the tables:

    mysql> UNLOCK TABLES;
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Shopping Cart
  • Your cart is empty.
Scroll to Top
0
Would love your thoughts, please comment.x
()
x