Deleted MySQL data recovery method: stop the server (1), back up the data directory (2), log in as super user (3), execute the recovery command in sequence (4), restore the data directory backup (5) , start the server (6).
How to recover deleted MySQL data
Steps to recover deleted data
<code>mysql -u root -p USE database_name; PURGE BINARY LOGS BEFORE 'log_name'; STOP SLAVE; CHANGE MASTER TO MASTER_LOG_FILE='', MASTER_LOG_POS=0; RESET SLAVE;</code>
Where:
database_name
is the deleted data database name. log_name
is the name of the binary log file that is logged before data is deleted. Note:
The above is the detailed content of How to restore mysql after deletion. For more information, please follow other related articles on the PHP Chinese website!