How to undo a query execution in phpmyadmin.
Any rollback functionality is there? any body knows the solution kindly help me?
Run the following command: mysql> SELECT GROUP_CONCAT(CONCAT('KILL ',id,';') SEPARATOR ' ') FROM information_schema. processlist WHERE user <> 'system user'; This will kill all your MySQL queries.
The ROLLBACK command is the transactional command used to undo transactions that have not already been saved to the database. This command can only be used to undo transactions since the last COMMIT or ROLLBACK command was issued.
Undo logs exist within undo log segments, which are contained within rollback segments. Rollback segments reside in the system tablespace, in undo tablespaces, and in the temporary tablespace. Undo logs that reside in the temporary tablespace are used for transactions that modify data in user-defined temporary tables.
If the statement is still running you can use KILL QUERY <thread_id>
.
If the statement has completed but you have not yet committed the transaction you can use ROLLBACK
.
If the statement has completed and the transaction is already committed (or you didn't start a transaction) then restore the data from your most recent backup.
Also here are some tips advice in order to prevent this type of situation happening in the first place:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With