1.如果数据库被别人清除了的情况下 首先确定数据库有没有开启 mysql-bin
2.如果开启之后 去找到 mysql-bin.000009 的文件类型(或者是000001名字用最小的那个就行)
3. 直接进行一个最新的表和数据还原 /www/server/mysql/bin/mysqlbinlog -d youhuiquan mysql-bin.000009 | mysql -uroot -p
4.设置新的数据库密码
update mysql.user set
authentication_string=password('密码') where user='root';
grant all privileges on *.* to 'root'@'%' identified by '密码' with grant option;
flush privileges;