当前位置:网站首页>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 combat optimization expert 09 production experience: how to deploy a monitoring system for a database in a production environment?
- Security design verification of API interface: ticket, signature, timestamp
- 【C语言】深度剖析数据存储的底层原理
- MySQL实战优化高手02 为了执行SQL语句,你知道MySQL用了什么样的架构设计吗?
- MySQL combat optimization expert 10 production experience: how to deploy visual reporting system for database monitoring system?
- Chrome浏览器端跨域不能访问问题处理办法
- Time in TCP state_ The role of wait?
- The underlying logical architecture of MySQL
- 百度百科数据爬取及内容分类识别
- How to find the number of daffodils with simple and rough methods in C language
猜你喜欢
随机推荐
Database middleware_ MYCAT summary
Global and Chinese market for intravenous catheter sets and accessories 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese markets for aprotic solvents 2022-2028: Research Report on technology, participants, trends, market size and share
Anaconda3 installation CV2
How to make shell script executable
Ueeditor internationalization configuration, supporting Chinese and English switching
MySQL实战优化高手05 生产经验:真实生产环境下的数据库机器配置如何规划?
Record the first JDBC
Discriminant model: a discriminant model creation framework log linear model
[Julia] exit notes - Serial
MySQL Real Time Optimization Master 04 discute de ce qu'est binlog en mettant à jour le processus d'exécution des déclarations dans le moteur de stockage InnoDB.
MySQL combat optimization expert 02 in order to execute SQL statements, do you know what kind of architectural design MySQL uses?
Mysql33 multi version concurrency control
MySQL combat optimization expert 05 production experience: how to plan the database machine configuration in the real production environment?
[after reading the series] how to realize app automation without programming (automatically start Kwai APP)
解决在window中远程连接Linux下的MySQL
[unity] simulate jelly effect (with collision) -- tutorial on using jellysprites plug-in
Time complexity (see which sentence is executed the most times)
Mysql27 - Optimisation des index et des requêtes
13 medical registration system_ [wechat login]









