Home > Database > Mysql Tutorial > 清空MySQL下的bin.00000mysql日志文件

清空MySQL下的bin.00000mysql日志文件

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:54:49
Original
1036 people have browsed it

今天上服务器上df了下,一看,var目录已经98%了,清空了些日志文件和备份文件后发现mysql下面有很多类似mysql-bin.000001的

     今天上服务器上df了下,一看,var目录已经98%了,清空了些日志文件和备份文件后发现mysql下面有很多类似mysql-bin.000001的文件,Google了一下说是日志,也没啥用就干掉吧

数据库的操作日志

  mysql-bin.000001

  mysql-bin.000002

  mysql-bin.000003

  等等好多日志文件都10多G了我mysql总数据库加起来都不到1G

  这些可以清理掉的。

  输入mysql -u root -p然后输入密码

  成功进去后输入reset master;记得这个;啊!

  mysql> reset master;

  Query OK, 0 rows affected, 1 warning (0.20 sec)

  就可以清空mysql日志了,世界都清爽了...

如果不想mysql记录日志可以在my.ini中关闭掉

  找到my.ini打开它 找到log-bin=mysql-bin然后注释掉就可以了

  #log-bin=mysql-bin

linux

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template