首页 > 数据库 > MySQL > 正文

mysql日志滚动

2024-07-24 12:47:43
字体:
来源:转载
供稿:网友

1,查看log情况

复制代码 代码如下:

mysql> show global variables like '%log%';
+---------------------------------+---------------------------------+
| Variable_name                   | Value                           |
+---------------------------------+---------------------------------+
| back_log                        | 50                              |
| binlog_cache_size               | 32768                           |
| binlog_format                   | MIXED                           |
| expire_logs_days                | 0                               |
| general_log                     | ON                              |
| general_log_file                | /usr/local/mysql/mysql.log      |
| log                             | ON                              |
| log_bin                         | ON                              |
| log_bin_trust_function_creators | OFF                             |
| log_bin_trust_routine_creators  | OFF                             |
| log_error                       | /var/log/mysqld.log             |
| log_output                      | FILE                            |
| log_queries_not_using_indexes   | OFF                             |
| log_slave_updates               | OFF                             |
| log_slow_queries                | ON                              |
| log_warnings                    | 1                               |
| max_binlog_cache_size           | 4294963200                      |
| max_binlog_size                 | 1073741824                      |
| max_relay_log_size              | 0                               |
| relay_log                       |                                 |
| relay_log_index                 |                                 |
| relay_log_info_file             | relay-log.info                  |
| relay_log_purge                 | ON                              |
| relay_log_space_limit           | 0                               |
| slow_query_log                  | ON                              |
| slow_query_log_file             | /usr/local/mysql/mysql-slow.log |
| sql_log_bin                     | ON                              |
| sql_log_off                     | OFF                             |
| sql_log_update                  | ON                              |
| sync_binlog                     | 0                               |
+---------------------------------+---------------------------------+
30 rows in set (0.00 sec)
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表