Question: I have a user table, and I have 5 records.

I deleted two records, then executed the rollback command, it executed successfully.

But that deleted two records not recovered.

The user table engine is [InnoDB](http://en.wikipedia.org/wiki/InnoDB).

Answer: 
```
SET autocommit=0;
BEGIN;
.
.
.
ROLLBACK;

```

[START TRANSACTION, COMMIT, and ROLLBACK Syntax](http://dev.mysql.com/doc/refman/5.0/en/commit.html)
I think there is one important thing to mention: to re-enable autocommit after transaction is done.

```
SET autocommit = 0;
START TRANSACTION;
    INSERT INTO ..
    UPDATE <table> ..
COMMIT;
SET autocommit = 1;

```

Otherwise anything you do after disabling `autocommit` even without transaction will require you to explicitly commit.