[TriLUG] mysqldump of databases with foreign keys

Greg Brown gregbrown at mindspring.com
Fri Jul 9 16:26:07 EDT 2004


Yuk!  If you do figure this out I'd really like to hear how you solved 
it.  I'm toying
around right now but haven't come up with anything.

Greg

On Friday, Jul 9, 2004, at 15:27 US/Eastern, Bradford Powell wrote:

> I asked this question on IRC, but apparently no one was around with any
> ideas...
>
> How does one go about making a backup of a mysql database that has 
> foreign
> keys? When I use mysqldump, it just dumps the tables in alphabetical
> order. This results in some foreign key constraints being defined 
> before
> the tables they reference. Obviously this is an error condition. Is 
> there
> some way to automatically reorder the dump to take dependancies into
> account or to inactivate foreign keys until after the dump is complete?
>
> I never have this problem with pg_dump...
>
> -- bradford powell
> -- bradford_powell at unc.edu
>
> -- 
> TriLUG mailing list        : 
> http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc
>




More information about the TriLUG mailing list