[debian-mysql] Bug#722346: Bug#722346: --no-use-db option for mysqldump?

Clint Byrum spamaps at debian.org
Tue Sep 10 15:39:44 UTC 2013


Excerpts from Sebastien Hinderer's message of 2013-09-10 05:52:37 -0700:
> Package: mysql-client
> Version: 5.5.31+dfsg-1
> Severity: wishlist
> 
> Would it be possible to add to mysqldump a --no-use-db option similar to
> the --no-create-db option it already has?
> 
> This would be useful when one wants to duplicate a databse. Indeed, in
> this situation, one wants the tablesto be inserted in a db whose name is
> different from the name of the original db.But when the USE originaldb
> line is met mysql automatically swithces to the original db, although it
> has ben run on the new one, so that the duplication is not done.
> 
> Of course the two databases could have different access rights, so that
> the USE would fail, making mysql remain in the newdb, but this does not
> seem so clean.

Hi Sebastian!

If you specify a single database on the command line of mysqldump it
will not include any "USE" statements. Those are only included when you
do multiple databases or --all-databases.



More information about the pkg-mysql-maint mailing list