Solved

undo last query in mysql workbench

Posted on 2014-01-30
4
5,203 Views
Last Modified: 2014-02-08
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
Comment
Question by:rgb192
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 39823970
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
 
LVL 78

Assisted Solution

by:arnold
arnold earned 250 total points
ID: 39823986
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
 

Author Closing Comment

by:rgb192
ID: 39844718
I paid hosting company after hearing these no answers.

Thanks.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question