Mariadb 10.3.17 enabled binlog

First check whether to open the binlog
SHOW VARIABLES the LIKE 'log_bin';
if prompted:
+ --------------- + ------- +
| variable_name | Value |
+ --- + ------- + ------------
| log_bin | OFF |
+ --------------- + ------- +
. 1 in Row SET (0.104 sec)

is required to perform the following steps:

 
increasing mariadb configuration, opening the binlog:
Vim /etc/my.cnf.d/server.cnf
increase following configuration [mysqld] section:
log- = MySQL-bin bin
max-size = the binlog. 1G-

save restart MariaDB service:
systemctl the restart MariaDB
perform login MySQL:
SHOW the VARIABLES the LIKE 'log_bin';
if Tip:
+ ------------ + ------- + ---
| variable_name | Value |
+ --------------- + ------- +
| log_bin | ON |
+ - ------------- + ------- +
1 row in set (0.002 sec)

then the binlog opened successfully, and then execute:
SHOW BINLOG EVENTS;
If the database operation records show, then binlog enabled success.
The data can also be entered mariadb - whether dir view binary log files are generated:
cd / Home / mariadb /
LL
if similar document is displayed, the binlog success:
MySQL-bin.000001
MySQL-bin.index

Guess you like

Origin www.cnblogs.com/sixiweb/p/12030749.html