• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6122
  • Last Modified:

undo last query in mysql workbench

CREATE TABLE `a_messages` (
  `a_messages_id` int(11) NOT NULL auto_increment,
  `conversation_id` bigint(20) default NULL,
  `profile_id` varchar(20) default NULL,
  `sender` varchar(20) default NULL,
  `message_id` bigint(20) default NULL,
  `message_text` varchar(1000) default NULL,
  `dateAgo` datetime default NULL,
  `message_read` tinyint(4) default NULL,
  `this_user` varchar(20) default NULL,
  PRIMARY KEY  (`a_messages_id`),
  UNIQUE KEY `unique_message_id` (`message_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2110 DEFAULT CHARSET=utf8;










could I undo one delete query run in mysql workbench

delete from a_messages where this_user!='staff1'




this is a shared hosting mysql
I have not enabled remote administration for this server.  Without it this log file can not be shown.


mysql workbench is an oracle tool
0
rgb192
Asked:
rgb192
2 Solutions
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
short answer is :no

with MyISAM tables, you don't have transactions, so even if you had done a BEGIN TRANSACTION before, a ROLLBACK would not work (would not do anything).

so, unless you have a backup of the data BEFORE the delete, you cannot recover from the DELETE you did
0
 
arnoldCommented:
The following must have been done and set before this incident DB Backup and log-bin in my.cnf (transactional log) is the only way to get the data back to its state.
restore DB from backup and then replay the transactions from the transaction log up-to the point when you issued the delete.
0
 
rgb192Author Commented:
I paid hosting company after hearing these no answers.

Thanks.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Tackle projects and never again get stuck behind a technical roadblock.
Join Now