当前位置:网站首页>MySQL flush operation
MySQL flush operation
2022-07-06 10:37:00 【wx5caecf2ed0645】
If you want to clear MySQL Part of the internal cache used , You should use FLUSH sentence . To execute FLUSH, You must have RELOAD jurisdiction .
flush_option
HOSTS
Used to empty the host cache table . If some hosts change IP Or if you get an error message Host host_name is blocked, Then you should refresh the host table . When connected to MySQL Server time , If for a given host , Successive errors “ More than max_connect_errors”, here ,MySQL It is assumed that an error has occurred , And prevent subsequent connection applications from the host . Refreshing the host table allows the host to try to connect again . Please see the A.2.5 section ,“ The host host_name blocked ”. You can use max_connect_errors=999999999 start-up mysqld, To avoid this error message .
DES_KEY_FILE
Used when the server starts , From the adoption of --des-key-file Option to reload the file specified DES keyword .
LOGS
Used to close and reopen all log files . If you have specified an update log file or a binary log file , At the same time, there is no extension , Relative to the previous file , The extension number of the log file increases 1. If you use an extension in the file name , be MySQL Will close and reopen the log file . stay Unix in , When phase mysqld Server sends a SIGHUP Signal time , It will be the same ( The exception is partial Mac OS X 10.3 edition . In these versions ,mysqld Ignore SIGHUP and SIGQUIT).
If the server uses --log-error Options , be FLUSH LOGS This will cause the error log to be renamed ( Use suffix -old), meanwhile mysqld A new empty log file will be created . If there is no given --log-error Options , Will not be renamed .
PRIVILEGES
For from mysql The authorization table in the database reloads permissions .
QUERY CACHE
Defragment the query cache , To make better use of memory . And RESET QUERY CACHE Different , This statement does not cancel any queries from the cache .
STATUS
Used to reset most state variables to zero . Only when debugging queries , You should use this . Please see the 1.7.1.3 section ,“ How to communicate defects and problems ”.
{TABLE | TABLES} [tbl_name [, tbl_name] ...]
When no table is named , Close all open tables , And force all tables in use to close . This will also refresh the query cache . This entry contains one or more table names , Refresh only the given table . and RESET QUERY CACHE The sentence is the same ,FLUSH TABLES It also cancels all query results from the query cache .
TABLES WITH READ LOCK
For all databases with read lock , Close all open tables , And lock all tables , Until you execute UNLOCK TABLES until . If you have a file system that can take snapshots in time , such as Veritas, Then this is a very convenient method for backup .
USER_RESOURCES
Used to reset all hourly user resources to zero . This can make the connection per hour 、 Clients that query or update the limit value immediately resume activity .FLUSH USER_RESOURCES Maximum limit not applicable to simultaneous connections . Please see the 13.5.1.3 section ,“GRANT and REVOKE grammar ”.
FLUSH Statement is written to the binary log , Unless you use your own NO_WRITE_TO_BINLOG keyword ( Or its alias LOCAL). notes : In any case ,FLUSH LOGS, FLUSH MASTER, FLUSH SLAVE and FLUSH TABLES WITH READ LOCK Will not be logged , Because if they are copied to a secondary server , Can cause problems .
You can also use the flush-hosts, flush-logs, flush-privileges, flush-status or flush-tables Command access contains mysqladmin Application statements .
边栏推荐
- MySQL real battle optimization expert 08 production experience: how to observe the machine performance 360 degrees without dead angle in the process of database pressure test?
- Mysql35 master slave replication
- Global and Chinese market of transfer switches 2022-2028: Research Report on technology, participants, trends, market size and share
- Mysql33 multi version concurrency control
- Technology | diverse substrate formats
- MySQL35-主从复制
- Solution to the problem of cross domain inaccessibility of Chrome browser
- Jar runs with error no main manifest attribute
- Preliminary introduction to C miscellaneous lecture document
- What should the redis cluster solution do? What are the plans?
猜你喜欢

Security design verification of API interface: ticket, signature, timestamp

The appearance is popular. Two JSON visualization tools are recommended for use with swagger. It's really fragrant

MySQL23-存儲引擎

Mysql34 other database logs

The underlying logical architecture of MySQL

MySQL23-存储引擎

In fact, the implementation of current limiting is not complicated

MySQL combat optimization expert 03 uses a data update process to preliminarily understand the architecture design of InnoDB storage engine

【C语言】深度剖析数据存储的底层原理

Adaptive Bezier curve network for real-time end-to-end text recognition
随机推荐
What is the current situation of the game industry in the Internet world?
MySQL combat optimization expert 12 what does the memory data structure buffer pool look like?
Mysql23 storage engine
ByteTrack: Multi-Object Tracking by Associating Every Detection Box 论文阅读笔记()
Global and Chinese market for intravenous catheter sets and accessories 2022-2028: Research Report on technology, participants, trends, market size and share
Bytetrack: multi object tracking by associating every detection box paper reading notes ()
Database middleware_ MYCAT summary
Global and Chinese market of thermal mixers 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese market of transfer switches 2022-2028: Research Report on technology, participants, trends, market size and share
MySQL combat optimization expert 06 production experience: how does the production environment database of Internet companies conduct performance testing?
MySQL24-索引的数据结构
MySQL32-锁
February 13, 2022-3-middle order traversal of binary tree
MySQL36-数据库备份与恢复
MySQL27-索引优化与查询优化
MySQL底层的逻辑架构
MySQL21-用户与权限管理
百度百科数据爬取及内容分类识别
MySQL combat optimization expert 07 production experience: how to conduct 360 degree dead angle pressure test on the database in the production environment?
Mysql24 index data structure