SolutionsFailure summaryThe global read lock in the system was acquired by another thread (with an S lock), so DML will appear waiting for global read lock on the GRL with IX lock, and the set READ_ONLY is the S lock on GRL, So at this point it is
Today, the flush tables with read lock command was used to solve Database Synchronization exceptions, so I learned about the lock table by the way.
1. FLUSH TABLES WITH READ LOCK
This command is global read lock. After the command is executed, all
The set global read_only is a global level and can be written by the root user after 1, and other users cannot write FLUSH tables with read lock is table-level (using unlock tables to unlock) and cannot be written by all users after execution. But
Tested two case, which belongs to the legacy of the previous blog:
InnoDB How to load a data dictionary
What did flush tables do?
Let's take a look at the InnoDB load data dictionary:First Use: SELECT * from TT;1. Create a Handler
Take a look at the picture+----+------+-----------+------+------------+------+-------------------------+--------------------------------- -------+| Id | User | Host | db | Command | Time | State | Info |+----+------+-----------+------+------------+--
1.FLUSH TABLES with READ LOCKThis command is a global read lock, and all of the library tables are locked for read-only after the command has been executed. is generally used in the database online backup, this time the database write operations
We can understand the rationale behind mysqldump by opening the general log and looking at the commands executed during mysqldump full library backup.Open General Logmysql> set global general_log=on;Where the general log's storage path can be viewed
For MySQL backup, it can be divided into the following two kinds:1. Cold Standby2. Hot standbyAmong them, cold, as the name implies, is to turn off the database, using operating system commands to copy database related files. The hot standby refers
System LockShow processlistStatus entries in Show Processlist output: 5.1 None of the manuals, or the translation of the problem, are accompanied by 5.5 original description:After createThis occurs when the thread creates a table (including internal
Original source: MySQL 5.5 Reference ManualPart of the translation: "mysql_5.1 Chinese reference Manual"Reprint please specify the original link http://www.cnblogs.com/lenagt/archive/2012/06/06/2538201.html Thank you.---------------------------------
Wait problems caused by--mysql flush-------------------------------2014/07/13PrefaceIn the actual production environment, a large number of SQL statements are sometimes found to be in waiting for table. State, sometimes it may seem confusing, this
The following is a migration process for a business library, migrating from the source Master/slave cluster to the target MHA cluster.Prior to preparation, the configuration data is copied from source master to target master, i.e. target master
When the database is operational in the current network, the database should be hot prepared frequently. One way to ensure data integrity and consistency during recovery is to lock the table before the backup, but the lock table can affect the
Implementation principle of mysqldump and implementation principle of mysqldump
MySQL backup can be divided into the following two types:
1. Cold backup
2. Hot Standby
Among them, cold backup, as its name implies, is to turn off the database and use
1,--single-transactionInnoDB table when backing up, the option --single-transaction is usually enabled to guarantee the consistency of the backup , in fact it works by setting the isolation level for this session to: repeatable READ To ensure that
Mysql monitoring methods are roughly divided into two categories: 1. connect to the mysql database and use showstatus, showvariables, and flushstatus to view various mysql performance indicators. 2. directly use mysqladmin to view its performance
Abstract: This article describes how to optimize SQL queries. You can manually use the EXPLAIN statement to check the efficiency of SQL queries. In addition, some principles for optimizing SQL statements are described, mainly about how to optimize
Fast insertion of large data volumes in MySQLMethod andStatement OptimizationThis is what we will introduce in this article. Next we will introduce them one by one, hoping to get some benefits for you!
INSERT statement speed
The time required to
Database Backup is extremely important. If there is no backup, you will be crazy in the following situations: UPDATEorDELETEwhitoutwhere & hellip; tablewasDROPPedaccidentally & hellip; INNODBwascorrupt & hellip; entiredatacenterlosespower & helli
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.