The mysql database was deleted by hackers, the solution. Reprint

The main solution is to modify the complexity of the password.
I use it by myself, so I only delegate the ROOT authority to the IP I use.
At the same time, open the log of the database for easy review:

//第一种是系统记录
//系统日志中查看日志数据
show variables like 'gen%';
没有开的话打开,记得打开 

//第二种是数据库记录
//默认table更改为FILE过,就是表格记录日志
//查看记录方式
show variables like '%log_output%';

//更改日志
set  global log_output='TABLE';
//查看日志
select * from mysql.general_log;
//问题处理完成后,记得修改配置
//下面是修改成原来的配置,减轻数据库的压力
set  global log_output='FILE';
truncate table mysql.general_log;


Then add the test data and wait for the hacker attack to continue. Check the effect.
If it doesn't work, reinstall MySQL, then re-entitle and change the password.
Reprinted blog:
https://blog.csdn.net/qq_38522954/article/details/108075857?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-3.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog -BlogCommendFromMachineLearnPai2-3.channel_param

Guess you like

Origin blog.csdn.net/weixin_44607885/article/details/109642954