Thoughts about server database fall

Not much nonsense, go directly to the topic.
Operation project today, the data request failed!
So I searched the database and found that three consecutive libraries have been written with this travel mark. This is too memorable!
Check the log, the invasion started at 0:53 in the morning!
No luck! Fortunately, there is backup data, and everything is fine!

Insert picture description here

For the sake of safety, I made mysql binlog log. Of course, there are a lot of safety aspects!

 mysql -u root -p123456
mysql> show variables like '%log_bin%';

Insert picture description here

turn up

# vi /etc/my.cnf
或者是
# /etc/my.ini

Add the following configuration

server-id=1
log-bin="C:/phpStudy/PHPTutorial/MySQL/lib"

Restart the service and see the effect
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_37254196/article/details/108533580