With Mysqlbinlog
PHP Processing code:
Export the Mysql-bin.xxxxxx file as readable text:
<?PHP//Export the mysql-bin.000xxx file for readability txt text//0 for execution success, 1 for failed//system ("CD d:/wamp/bin/mysql/mysql5.5.8/data", $comReturn); for($i= 200;$i<267;$i++){$command= "D:/wamp/bin/mysql/mysql5.5.8/bin/mysqlbinlog d:/wamp/bin/mysql/mysql5.5.8/data/mysql-bin.000".$i. ">> D:/baksql/baksqlaa.txt";system($command,$comReturn);Var_dump($comReturn);} ?>
Isolate the statement that needs to be executed:
<?PHP//Export SQL statements$file= "D:/baksql/baksqlaa.txt";$arr=file($file);$str= ' ';$insert= "INSERT into ' che '. ' Che_tuangou '";$update= "UPDATE ' che '. ' Che_tuangou '";foreach($arr as $v){ if(Stripos($v,$insert) !==false) { $str.=$v.";\ r\n "; }}file_put_contents("D:/insertsql.txt",$str);?>
phpMyAdmin How to recover after deleting the table by mistake