Home > Backend Development > PHP Tutorial > How to lock MYSQL data table_PHP tutorial

How to lock MYSQL data table_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 17:01:07
Original
914 people have browsed it

When checking or repairing the data table, you can lock the data table first to ensure the security of the data table:
mysql>LOCK TABLE tbl_name READ;
mysql>FLUSH TABLES;
Lock the data table and then Perform inspection or repair work. Unlock after completion:
mysql>UNLOCK TABLES;
//LOCK TABLE tbl_name READ means to lock into a read-only state. In this state, the user can only read the data table and cannot write.
LOCK TABLE tbl_name WRITE is a stricter lock, the user cannot read or write.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631174.htmlTechArticleWhen checking or repairing the data table, you can lock the data table first to ensure the security of the data table: mysqlLOCK TABLE tbl_name READ; mysqlFLUSH TABLES; Lock the data table and then check...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template