restore question
Hi everyone- 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 :-) Any suggestions would b greatly appreciated! James Sheffer, The HigherPowered Team! supp...@higherpowered.com sa...@higherpowered.com Web Design Development http://www.higherpowered.com phone: 469-256-0268 We help businesses succeed on the web! --- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: restore question
Hello Jim, On 7/5/2013 3:11 PM, Jim Sheffer wrote: Hi everyone- 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 :-) Any suggestions would b greatly appreciated! 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 :) Yours, -- Shawn Green MySQL Principal Technical Support Engineer Oracle USA, Inc. - Hardware and Software, Engineered to Work Together. Office: Blountville, TN -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: restore question
Hi 2013/7/5 Jim Sheffer j...@higherpowered.com Hi everyone- 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. First, dump current scheme with: mysqldump --skip-data database database_schema.sql Second, extract schema from Navicat (this might need additional filtering, I'm not sure): grep -v 'INSERT INTO' backup.dump.sql navicat_schema.sql Third, compare: diff -u database_schema.sql navicat_schema.sql 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 :-) Any suggestions would b greatly appreciated! James Sheffer, The HigherPowered Team! supp...@higherpowered.com sa...@higherpowered.com Web Design Development http://www.higherpowered.com phone: 469-256-0268 We help businesses succeed on the web! --- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Restore Question
We're in the process of changing our InnoDB databases to file-per-table. I started last night with our test server. It went pretty smoothly, except for one stupid mistake on my part. I backed up all databases, deleted he data and log files, re-created the MySQL database from the script, then restored all the user databases. Everything is fine, except of course I'm missing all the users. So my questions are: 1. I had to create the new mysql database in order to get the server to start without error ([ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist).After creating a new mysql db from the script, should I have first restored the old mysql database, then the user databases? 2. Somewhere I saw that I still needed to create the InnoDB shared tablespace. What does InnoDB use this for? For the production system, I need to estimate what size to start with. 3. I restored the original mysql database as mysql_old, so I have access to the old grant tables. Any suggestions for how to recover the user permissions without redoing all the steps? Thanks, Donna
Re: Restore Question
In news:[EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED] typed: After creating a new mysql db from the script, should I have first restored the old mysql database, then the user databases? You should first restore mysql database just to be on the safe side, but I don't think the import of other databases would fail if you did otherwise. 2. Somewhere I saw that I still needed to create the InnoDB shared tablespace. What does InnoDB use this for? For the production system, I need to estimate what size to start with. InnoDB stores there some internal structures and undo logs. Unless there are large or lenghty transactions performed in your database, you shouldn't need much space for the shared tablespace. You may also consider allowing this tablespace to extend automatically if more space is required, which is generally a good idea. 3. I restored the original mysql database as mysql_old, so I have access to the old grant tables. Any suggestions for how to recover the user permissions without redoing all the steps? The simplest solution is to stop the database, remove the contents of datadir/mysql directory and move there all the files from datadir/mysql_old (or copy preserving owner/group/permissions). Then start the server agin. Maciek -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Stupid backup/restore question
I have a working server and a development server. From time to time I'd like to refresh the content of my development server with what's on my working server. So I take one of my regular backups, that I get by doing mysqldump database dbbackupJuly1-02. Then I gzip this, ftp it over to my development server, gunzip it, and try mysql database dbbackupJuly1-02, and immediately get an ERROR 1050 at line 11: Table 'firsttable' already exists message. What should I be doing instead? The docs don't seem to specify this, and there doesn't seem to be an ignore or replace option for the mysql command. Do I actually have to drop all the tables on my development box before loading in from the backup? Jesse Sheidlower [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Stupid backup/restore question
Jesse, try to make dump (mysqldump) with option --add-drop-table or --opt (it will be faster). Description of this options see here http://www.mysql.com/doc/m/y/mysqldump.html Best regards, Mikhail. - Original Message - From: Jesse Sheidlower [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 01, 2002 6:30 PM Subject: Stupid backup/restore question I have a working server and a development server. From time to time I'd like to refresh the content of my development server with what's on my working server. So I take one of my regular backups, that I get by doing mysqldump database dbbackupJuly1-02. Then I gzip this, ftp it over to my development server, gunzip it, and try mysql database dbbackupJuly1-02, and immediately get an ERROR 1050 at line 11: Table 'firsttable' already exists message. What should I be doing instead? The docs don't seem to specify this, and there doesn't seem to be an ignore or replace option for the mysql command. Do I actually have to drop all the tables on my development box before loading in from the backup? Jesse Sheidlower [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Stupid backup/restore question
use the --opt option for mysqldump. --opt Same as --add-drop-table --add-locks --all --extended-insert --quick --lock-tables Other than that, it's the method I use. =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Jesse Sheidlower [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 11:30 AM To: [EMAIL PROTECTED] Subject: Stupid backup/restore question I have a working server and a development server. From time to time I'd like to refresh the content of my development server with what's on my working server. So I take one of my regular backups, that I get by doing mysqldump database dbbackupJuly1-02. Then I gzip this, ftp it over to my development server, gunzip it, and try mysql database dbbackupJuly1-02, and immediately get an ERROR 1050 at line 11: Table 'firsttable' already exists message. What should I be doing instead? The docs don't seem to specify this, and there doesn't seem to be an ignore or replace option for the mysql command. Do I actually have to drop all the tables on my development box before loading in from the backup? Jesse Sheidlower [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Stupid backup/restore question
On 1 Jul 2002, at 12:30, Jesse Sheidlower wrote: What should I be doing instead? The docs don't seem to specify this, and there doesn't seem to be an ignore or replace option for the mysql command. Do I actually have to drop all the tables on my development box before loading in from the backup? Have you seen the --add-drop-table option (see http://www.mysql.com/doc/m/y/mysqldump.html), or is that what you mean by your reference to dropping the tables? Without dropping the tables, how would you get rid of records that have been deleted? (Still writing for Copy Editor?) [Filter fodder: SQL] -- Keith C. Ivey [EMAIL PROTECTED] Tobacco Documents Online http://tobaccodocuments.org - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Stupid backup/restore question
On Mon, Jul 01, 2002 at 01:23:38PM -0400, Keith C. Ivey wrote: On 1 Jul 2002, at 12:30, Jesse Sheidlower wrote: What should I be doing instead? The docs don't seem to specify this, and there doesn't seem to be an ignore or replace option for the mysql command. Do I actually have to drop all the tables on my development box before loading in from the backup? Have you seen the --add-drop-table option (see http://www.mysql.com/doc/m/y/mysqldump.html), or is that what you mean by your reference to dropping the tables? Thanks to all who responded with this general suggestion. I had looked at the --opt option, but ignored it as speed wasn't a real issue for this. And it didn't occur to me that this would be something to specify in the backup, rather than the restore. Without dropping the tables, how would you get rid of records that have been deleted? Well, I said in the subject line it was a stupid question! (Still writing for Copy Editor?) Yup. Jesse MySQL Query Sheidlower [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
newbie backup restore question
I have a mysql database that I backed up by copying my /var directory to a cd before I installed a new release of linux. How do I restore it on the new system? Do I need to create the database in the new version of mysql first, or just copy some files from the old data directory into the new one? Thanks, SW - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: newbie backup restore question
Once mysql is installed on the new system, you should be able to copy the old data directory onto the new and you should be good to go(make sure the permissions and the ownership are preserved) . Regards, Bhavin. - Original Message - From: Scott [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 11, 2002 5:06 PM Subject: newbie backup restore question I have a mysql database that I backed up by copying my /var directory to a cd before I installed a new release of linux. How do I restore it on the new system? Do I need to create the database in the new version of mysql first, or just copy some files from the old data directory into the new one? Thanks, SW - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php