lnmp默认会在/usr/local/mysql/var/目录下生成格式为mysql-bin.000001的日志文件,占用了比较多的磁盘空间。
编辑/etc/my.cnf,注释掉log-bin=mysql-bin禁止生成日志:
1 |
#log-bin=mysql-bin |
重启mysql,会报错如下:
Starting MySQL.Manager of pid-file quit without updating file. ... failed! |
原因是禁用了log-bin,其相关项也要禁用,接着注释掉binlog_format=mixed:
1 |
#binlog_format=mixed |
重启成功。
发表评论