当前位置:网站首页>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 .
边栏推荐
- MySQL34-其他数据库日志
- [paper reading notes] - cryptographic analysis of short RSA secret exponents
- MySQL combat optimization expert 05 production experience: how to plan the database machine configuration in the real production environment?
- Download and installation of QT Creator
- MySQL combat optimization expert 10 production experience: how to deploy visual reporting system for database monitoring system?
- MySQL33-多版本并发控制
- 实现微信公众号H5消息推送的超级详细步骤
- Mysql35 master slave replication
- Sed text processing
- 第一篇博客
猜你喜欢
If someone asks you about the consistency of database cache, send this article directly to him
[reading notes] rewards efficient and privacy preserving federated deep learning
UEditor国际化配置,支持中英文切换
MySQL实战优化高手02 为了执行SQL语句,你知道MySQL用了什么样的架构设计吗?
Pytoch LSTM implementation process (visual version)
MySQL實戰優化高手04 借著更新語句在InnoDB存儲引擎中的執行流程,聊聊binlog是什麼?
Solve the problem of remote connection to MySQL under Linux in Windows
Ueeditor internationalization configuration, supporting Chinese and English switching
MySQL combat optimization expert 03 uses a data update process to preliminarily understand the architecture design of InnoDB storage engine
Not registered via @EnableConfigurationProperties, marked(@ConfigurationProperties的使用)
随机推荐
MySQL29-数据库其它调优策略
Implement sending post request with form data parameter
MySQL实战优化高手02 为了执行SQL语句,你知道MySQL用了什么样的架构设计吗?
MySQL combat optimization expert 10 production experience: how to deploy visual reporting system for database monitoring system?
MySQL实战优化高手09 生产经验:如何为生产环境中的数据库部署监控系统?
好博客好资料记录链接
Global and Chinese market of transfer switches 2022-2028: Research Report on technology, participants, trends, market size and share
Jar runs with error no main manifest attribute
Mysql25 index creation and design principles
Super detailed steps to implement Wechat public number H5 Message push
Solve the problem of remote connection to MySQL under Linux in Windows
Pytorch RNN actual combat case_ MNIST handwriting font recognition
Time complexity (see which sentence is executed the most times)
The underlying logical architecture of MySQL
MySQL30-事务基础知识
UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xd0 in position 0成功解决
In fact, the implementation of current limiting is not complicated
软件测试工程师必备之软技能:结构化思维
Mysql30 transaction Basics
Advantages and disadvantages of evaluation methods