当前位置:网站首页>IPtables and binlog
IPtables and binlog
2022-08-02 17:04:00 【hjw1001】
First check the kali virtual machine ip address 192.168.106.137
then nmap scan ip on windows
thiscan scan normally
Then configure port rejection on kaliThen use this to deny windows access
At this time, the scan found that the nmap status is closed
kali rejects nmap scanning through IPtable
binlog
binlog is closed by default
┌──(rootkali)-[~]
└─# vim /etc/mysql/mariadb.conf.d/50-server.cnf
Insert log-bin=mysql-bin statement
After restartThe binlog function is turned on
myAfter inserting it and restarting it, the binlog is not on and I don't know why...
View latest logs in mysql:
MariaDB [(none)]> show master logs;
MariaDB [(none)]> show binlog events in ‘mysqlbin.000001’\G
Create hjw library and table and insert some data:
First full backup:
┌──(rootkali)-[/tmp]
└─# mysqldump -uroot-proot -B -F -x --master-data=2 hjw|gzip >/tmp/hjwlog
Accidentally deleted the database by carelessness
Fortunately, there is a binlog backup
Avoid deleting and copying the latest files:
┌──(rootkali)-[/var/lib/mysql]
└─# cp -v mysqlbin.000012 /tmp
To avoid subsequent data flushing into logs:
MariaDB [mysql]> flush logs;
mysql opens the backup file
┌──(rootkali)-[/tmp]
└─# mysql -uroot -proot < hjwlog
At this time, the hjw database is restored, but it is not complete, so the file 000012 is used.
Edit the file 000012 to delete the data after drop and redirect it to mysqlbin
At this time, the data is completely restored
边栏推荐
猜你喜欢
随机推荐
MySQL----多表查询
页面返回顶部和固定导航栏js基础案例
DOM - page rendering process
【js手风琴效果案例】
对象和类总结
2022-07-16 第五小组 瞒春 学习笔记
延时函数-定时器
电设3----脉冲信号测试仪
2022-07-21 第六小组 瞒春 学习笔记
两分钟录音就可秒变语言通!火山语音音色复刻技术如何修炼而成?
Redis + Caffeine实现多级缓存
解决(An error happened during template parsing (template: “class path resource [templates/...]
vite.config.ts 引入 `path` 模块注意点!
XML技术
PAT甲级 1145 哈希 - 平均查找时间
【Anaconda】一行语句解决Spyder启动问题
lammps学习(二)联合原子模型聚乙烯拉伸
从零开始的循环之旅(下)
XML和注解(Annotation)
PAT tree DP (memory search) class a, 1079, 1090, 1106