1、直接先用mysql -u root -p命令进行登录
2、使用show variables like 'log_%';验证是否开启了binlog
3、查找mysql配置文件所在的位置my.cnf
4、在[mysqld]下面增加log-bin=mysql-bin
5、退出保存并重启mysql服务systemctl restart mysql
6、重新登录再次使用show variables like 'log_%';命令进行查看
时间:2024-10-14 03:38:15
1、直接先用mysql -u root -p命令进行登录
2、使用show variables like 'log_%';验证是否开启了binlog
3、查找mysql配置文件所在的位置my.cnf
4、在[mysqld]下面增加log-bin=mysql-bin
5、退出保存并重启mysql服务systemctl restart mysql
6、重新登录再次使用show variables like 'log_%';命令进行查看