Bootstrap FreeKB - mySQL / MariaDB - Display write access to table using flush tables with read lock
mySQL / MariaDB - Display write access to table using flush tables with read lock

Updated:   |  mySQL / MariaDB articles

The flush tables with read lock command can be used to disable write access to tables. The tables will continue to have read access. This might be useful before using the mysqldump command to export one or more tables to a .sql file to ensure no records are appended or updated on the tables while the mysqldump is being performed. This assume you are able to log into your MariaDB or mySQL server or you have configured passwordless authentication and will be using the -e command line option.

mysql -e "flush tables with read lock"

 

The unlock tables command can be used to remove the lock, restoring write access to the tables.

mysql -e "unlock tables"

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 7f18e7 in the box below so that we can be sure you are a human.