Home > Database > Mysql Tutorial > body text

扫除mysql二进制日志

WBOY
Release: 2016-06-07 16:23:35
Original
853 people have browsed it

清除mysql二进制日志 清除mysql二进制日志: 进入mysql执行: mysql show master logs; //查看日志 mysql reset master; //删除列于索引文件中的所有二进制日志,把二进制日志索引文件重新设置为空,并创建一个新的二进制日志文件 注销掉/etc/my.cnf中的 ---

清除mysql二进制日志
清除mysql二进制日志:

进入mysql执行:

mysql> show master logs; //查看日志

mysql> reset master; //删除列于索引文件中的所有二进制日志,把二进制日志索引文件重新设置为空,并创建一个新的二进制日志文件

注销掉/etc/my.cnf中的  ---如果有主从复制就不要注销掉

# log-bin=mysql-bin 用于产生二进制日志文件的

如果没有从服务器的,把#server-id = 1 也注销掉

再重启 mysql服务就可以了
Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!