dbTalk Databases Forums  

Backup Question

comp.databases.mysql comp.databases.mysql


Discuss Backup Question in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Joe Hesse
 
Posts: n/a

Default Backup Question - 03-05-2011 , 06:11 PM






Hi,

I want to use mysqldump to back up by database.

If I have to restore the database to another MySQL server I would like
all the grants and permissions to be the same. It seems then that I
should not only back up my database but also the information_schema and
mysql databases. Is this the correct strategy?

Thanks,
Joe

Reply With Quote
  #2  
Old   
Gordon Burditt
 
Posts: n/a

Default Re: Backup Question - 03-06-2011 , 12:42 AM






Quote:
I want to use mysqldump to back up by database.

If I have to restore the database to another MySQL server I would like
all the grants and permissions to be the same. It seems then that I
should not only back up my database but also the information_schema and
mysql databases. Is this the correct strategy?
Yes, you should back up the 'mysql' database. On restoring it, I think
the procedure needs to go like this:

1. Make sure your database exists (without necessarily having
anything in it).
2. Restore the 'mysql' database.
3. Restore your database.

'information_schema' is a virtual database that is constructed on
the fly out of other information. You can't restore it in a
conventional sense, and if you try dumping it, it will complain
about locking. Restore the other databases and it will come back.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.