Home > Database > Mysql Tutorial > body text

How to add mysql read-write lock?

coldplay.xixi
Release: 2020-06-29 15:40:11
Original
4765 people have browsed it

How to add a mysql read-write lock: First log in to mysql and execute the command [show databases]; then execute show to see how many database tables there are, and add read locks to the ceshi table; finally add the Just write the lock.

How to add mysql read-write lock?

How to add a read-write lock to mysql:

1. First, I log in to mysql through the command line and execute the command show databases; Check how many databases there are

How to add mysql read-write lock?

2. Execute show to check how many database tables there are, select * from ceshi Query the data in the table

How to add mysql read-write lock?

3. Execute lock table ceshi read; Add a read lock to the ceshi table.

How to add mysql read-write lock?

#4. Table ceshi is also readable in another process, and writing will be delayed. After adding a read lock to the table, the read permission is available, but the write permission may be disabled or delayed.

How to add mysql read-write lock?

5. Add a table write lock to the tablelock table ceshi write;

How to add mysql read-write lock?

## 6. When a table is write-locked in a process, the process itself has both read and write permissions on the table, while other processes have neither read nor write permissions on the table.

How to add mysql read-write lock?

Related learning recommendations:

mysql video tutorial

The above is the detailed content of How to add mysql read-write lock?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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