Binlog is a binary log file that is used to record MySQL data changes. Binlog logs can play a big role when restoring data. MySQL master-slave replication uses the binlog principle 1. After logging in to MySQL, use the following command to check whether binlog is enabled show variables like 'log_%'; 2. Edit the configuration file vi /etc/my.cnf 3. Add the following content server_id=2 log_bin = mysql-bin binlog_format = ROW expire_logs_days = 30 4. Restart MySQL service systemctl restart mysqld 5. Use the command show variables like 'log_%' again to view it. If it is ON, it means binlog is turned on. 6. The binlog log file storage path is /var/lib/mysql 7. Files like mysql-bin.000001 mysql-bin.000002 will be generated in this path You may also be interested in:
|
<<: How to develop Java 8 Spring Boot applications in Docker
>>: 20 JavaScript tips to help you improve development efficiency
Password Mode PDO::__construct(): The server requ...
1: If you use the tag <a> to link to a page,...
The show processlist command is very useful. Some...
Table of contents 1. Parent component passes data...
COALESCE is a function that refers to each parame...
The mysql on a server in the computer room had be...
Design the web page shown above: <!DOCTYPE htm...
After I finished reading JavaScript DOM, I had a ...
Table of contents Preface 1. What is 2. How to us...
You may sometimes need to create or delete symbol...
In some scenarios, we need to modify our varchar ...
With the popularization of 3G, more and more peop...
The insignificant flex-basis has caused a lot of ...
What is vuex vuex: is a state manager developed s...
This article shares a blinds special effect imple...