日志写入 my.cnf 时出现奇怪的行为

日志写入 my.cnf 时出现奇怪的行为

我知道这非常奇怪,而且是突然发生的。我在查看服务器磁盘使用情况时注意到它变得非常高。结果发现 /var/lib/mysql/my.cnf 中充满了日志……是的,如果我 vi my.cnf,我会得到以下信息:

170217  0:56:49 587333144 Query SET NAMES utf8
170217  0:56:46 587333157 Connect       XXX@localhost on XXX
170217  0:56:49 587333151 Init DB       XXX
170217  0:56:47 587333159 Connect       XXX@localhost on XXX
170217  0:56:48 587333160 Connect       XXX@localhost on XXX
                587333161 Connect       XXX@localhost on XXX
170217  0:56:33 587333089 Connect       XXX@localhost on XXX
170217  0:56:49 587333157 Init DB       XXX
                587333160 Init DB       XXX
170217  0:56:34 587333093 Connect       XXX@localhost on XXX
170217  0:56:49 587333091 Init DB       XXX
                587333092 Init DB       XXX
                587333089 Init DB       XXX
                587333151 Query SET NAMES utf8
170217  0:56:35 587333098 Connect       XXX@localhost on XXX
170217  0:56:49 587333093 Init DB       XXX
                587333094 Query SET NAMES utf8
170217  0:56:37 587333103 Connect       XXX@localhost on
170217  0:56:49 587333089 Query SET NAMES utf8
                587333100 Query SET NAMES utf8
170217  0:56:37 587333105 Connect       XXX@localhost on XXX
170217  0:56:49 587333091 Query SET NAMES utf8
                587333103 Init DB       XXX
                587333092 Query SET NAMES utf8
                587333097 Query SET NAMES utf8
                587333107 Init DB       XXX
                587333106 Init DB       XXX
                587333108 Init DB       XXX
                587333113 Init DB       XXX
                587333104 Query SET NAMES utf8
                587333114 Init DB       XXX
                587333112 Init DB       XXX
                587333113 Query SET NAMES utf8

XXX = 数据库名称。

我知道该怎么做才能阻止这种情况发生吗?

相关内容