参考文档:https://www.cnblogs.com/bixiaoyu/p/9638505.html MySQL开启慢查询不详述 MySQL5.7慢查询日志格式如下 /usr/local/mysql/bin/mysqld, Version: 5.7.22-log (MySQL Community Server (GPL)). started with: Tcp port: 3306 Unix socket: /tmp/mysql3306.sock Time Id Command Argume
MySQL错误日志是记录MySQL 运行过程中较为严重的警告和错误信息,以及MySQL每次启动和关闭的详细信息.错误日志的命名通常为hostname.err.其中,hostname表示服务器主机名. The error log contains information indicating when mysqld was started and stopped and also any critical errors that occur while the server is running.
之前看到mysql二进制日志后面会加一个以数字递增为结尾的后缀,一直在想当尾数到达999999后会发生什么情况,先查了一下官网,对后缀有这样一句介绍:The server creates binary log files in sequence by adding a numeric suffix to the base name 就是说会在你定义的二进制文件名后再加多一个数字为结尾,那么这个数最大为多少呢(此次实验版本为5.7.12)? 我们先让其到999999,再flush logs看一下,
二进制日志:记录数据库修改的相关操作,作用是即时点回复,主从复制 可以按时间滚动,也可以按大小滚动 server-id:服务器身份标识 一.二进制文件的删除方法,千万不要手动删除 PURGE BINARY LOGS TO 'mysql-bin.010'; PURGE BINARY LOGS BEFORE '2008-04-02 22:46:26'; 二.常用的操作: SHOW MASTER STATUS; FLUSH LOGS; SHOW BINARY LOGS; SHOW BINLOG EVE
mysql的日志文件 日志文件大致分为 error log, binary log, query log, slow query log, innodb redo log ;如图: 1.error log the error log file contains information indicating when mysqld was started and stopped also any critical errors that occur while the server is run