当前位置:网站首页>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 .
边栏推荐
- Global and Chinese market of transfer switches 2022-2028: Research Report on technology, participants, trends, market size and share
- Unicode decodeerror: 'UTF-8' codec can't decode byte 0xd0 in position 0 successfully resolved
- [programmers' English growth path] English learning serial one (verb general tense)
- Mysql27 index optimization and query optimization
- Use of dataset of pytorch
- Solve the problem of remote connection to MySQL under Linux in Windows
- 保姆级手把手教你用C语言写三子棋
- 基于Pytorch肺部感染识别案例(采用ResNet网络结构)
- MySQL27-索引優化與查詢優化
- MySQL ERROR 1040: Too many connections
猜你喜欢
Mysql35 master slave replication
What is the current situation of the game industry in the Internet world?
Preliminary introduction to C miscellaneous lecture document
Solve the problem of remote connection to MySQL under Linux in Windows
MySQL21-用户与权限管理
Nanny hand-in-hand teaches you to write Gobang in C language
Record the first JDBC
Pytoch LSTM implementation process (visual version)
MySQL27-索引优化与查询优化
Not registered via @enableconfigurationproperties, marked (@configurationproperties use)
随机推荐
Baidu Encyclopedia data crawling and content classification and recognition
Super detailed steps for pushing wechat official account H5 messages
MySQL combat optimization expert 04 uses the execution process of update statements in the InnoDB storage engine to talk about what binlog is?
Use of dataset of pytorch
软件测试工程师发展规划路线
First blog
MySQL底层的逻辑架构
Windchill配置远程Oracle数据库连接
16 medical registration system_ [order by appointment]
Simple solution to phpjm encryption problem free phpjm decryption tool
If someone asks you about the consistency of database cache, send this article directly to him
MySQL28-数据库的设计规范
Solve the problem of remote connection to MySQL under Linux in Windows
Moteur de stockage mysql23
Global and Chinese market of wafer processing robots 2022-2028: Research Report on technology, participants, trends, market size and share
MySQL25-索引的创建与设计原则
What is the difference between TCP and UDP?
Use xtrabackup for MySQL database physical backup
Security design verification of API interface: ticket, signature, timestamp
Mysql30 transaction Basics