MySQL Lock Overview The MyISAM storage engine only supports table locks, which is the only lock type supported in the first few versions of MySQL. As applications' requirements for transaction integrity and concurrency continued to increase, MySQL began to develop a transaction-based storage engine. Later, the BDB storage engine that supports page locks and the InnoDB storage engine that supports row locks gradually appeared (InnoDB is actually a separate company and has now been acquired by Oracle). However, MyISAM table locks are still the most widely used lock type. This section will introduce the use of MyISAM table locks in detail. Table lock contention on your system can be analyzed by examining the table_locks_waited and table_locks_immediate status variables: You can analyze the row lock contention on your system by checking the InnoDB_row_lock status variable: Unlock The first show processlist; Find the lock process and kill its ID; The second mysql>UNLOCK TABLES; Lock table Lock the data table to prevent the table from being updated during the backup process mysql>LOCK TABLES tbl_name READ; Add a write lock to the table: mysql>LOCK TABLES tbl_name WRITE; You may also be interested in:
|
<<: How to set up jar application startup on CentOS7
>>: HTML5 and jQuery to implement preview code examples before uploading local pictures
The error is as follows: Uncaught TypeError: Cann...
1. MySQL User Management [Example 1.1] Log in to ...
How to create a virtual machine on VMware and ins...
This article example shares the specific code of ...
Upgrade process: Original system: CentOS7.3 [root...
Today, I want to write about a "low-tech&quo...
Preface We all know that the QR codes in official...
Table of contents Why do we need Docker? Docker d...
Preface In practice, we may encounter such a prob...
Gird layout has some similarities with Flex layou...
20200804Addendum: The article may be incorrect. Y...
This article introduces the sample code of CSS3 t...
This article shares the specific code of JavaScri...
First delete mysql: sudo apt-get remove mysql-* T...
Create a mysql user and authorize: Format: grant ...