Re: Copy/Rename Database MySQL

From: Date: Fri, 05 Jan 2001 18:27:34 +0000
Subject: Re: Copy/Rename Database MySQL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32917@lists.php.net to get a copy of this message
Try mysqldump. Without compression : Export : mysqldump -uUsername -p dbname > dbname.sql Import : mysql -uUsername -p dbname < dbname.sql Or with compression : Export : mysqldump -uUsername -p dbname | gzip > dbname.gz Import : gunzip < dbname.gz | mysql -uUsername -p dbname This being from the command line. Also, replace 'dbname' with anything, anywhere. Export your db, import it into any database. You may want to look into various mysqldump options, have a look : http://www.mysql.com/Manual_chapter/manual_Tools.html#mysqldump Or of course try : man mysqldump mysqldump --help Some useful options in there. Philip Olson http://www.cornado.com/ > > Is there an easy way to copy a database and rename it to something else? > > David Smith > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#32917) next »