美文网首页
ubuntu18.04下开启MySQL的binlog日志

ubuntu18.04下开启MySQL的binlog日志

作者: 吃铝的二月鸟 | 来源:发表于2020-09-20 17:53 被阅读0次

ubuntu18下的MySQL配置binlog的文件在

/etc/mysql/mysql.conf.d/mysqld.cnf中

vim /etc/mysql/mysql.conf.d/mysqld.cnf

在mysqld.cnf中,在[mysqld]下添加

server_id=1

log_bin=/var/log/mysql/mysql-bin.log

添加后在重启mysql服务,service mysql restart

在mysql中输入命令:show master status

这时候binlog日志开启成功。

相关文章

网友评论

      本文标题:ubuntu18.04下开启MySQL的binlog日志

      本文链接:https://www.haomeiwen.com/subject/uqdpyktx.html