数据库密码破解:
1、修改/etc/my.cnf配置文件
vim /etc/my.cnf
添加skip-grant-tables
2、重启mysql服务
3、mysql 登入修改密码
update user set authentication_string = password('654321') where User = 'root' and Host = 'localhost';
4、编辑/etc/my.cnf配置文,删除skip-grant-tables,然后重启启动mysql服务
5、使用新密码登入mysql测试
[root@localhost ~]# ls
anaconda-ks.cfg passwd
[root@localhost ~]# cat passwd
RIa<P+tD%6qV
[root@localhost ~]# mysql -uroot -p'RIa<P+tD%6qV' //登录报错显示需要libncurses.so.5
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory