top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

need to do a "restore" into the database using mySql

0 votes
24 views

This is probably a no brainer (I'm new to Navicat) but I have a backup of a database from Navicat.

I want to be able to see if a certain field has changed since this morning in the backup (We are having problems with an order that somehow "duplicated" the items. I need to see if there was only 1 of each item or two removed from inventory). I don't need to do a "restore" into the database, just have a look at the backup.

Is this possible without going through the hoops of creating a copy of the database and restoring to the copy (I assume this is possible) - I DO NOT want to restore into the currently running database :-)

posted Jul 5, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+1 vote
 
Best answer

If the Navicat backup used the same process as mysqldump, then your table's data is stored in a plain-text SQL script.

Step 1) find the CREATE TABLE... command for the table you are interested in.

Step 2) Just after the table's definition, you should see a sequence of INSERT commands. Those are your rows. Use your find or grep or search skills to identify the primary key values for the rows you are interested in. Visually parse that row (it's contained in its own set of () parentheses) to find the 'old' values you seek.

Sorry that it's such a manual process but you didn't want to restore so you get to pretend to be the database server :)

answer Jul 5, 2013 by anonymous
Similar Questions
+2 votes

I have a date field on an html form that users may leave blank. If they do leave it blank I want to write the date 01/01/1901 into the mysql table. How can I accomplish this and where in my .php script file should I put the code?

0 votes

I have a client where their next auto-increment number just jumped from 2300 to 1000000000 for reasons not understood. They want it set back.

Options such as dropping the primary key and rebuilding the index is NOT possible -- this is a relational table thing. So, is there a way (programmatically) to set the next number in an auto-increment?

Something like:

alter table abc auto_increment = 2301;

Any ideas of why this happened?


Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.
QUERY HOME
...