Re: generating a mysql script

From: Date: Tue, 21 Sep 2004 19:11:41 +0000
Subject: Re: generating a mysql script
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-197458@lists.php.net to get a copy of this message
If course, if you don't have shell access, phpMyAdmin is all you'll ever need http://www.phpmyadmin.net Cheers Chris Brian V Bonini wrote:
On Mon, 2004-09-20 at 19:37, Stut wrote:
On Mon, 20 Sep 2004 16:20:21 -0700, AMC <aboehme@netgate.net> wrote:
Is there a tool that will generate a script that can be run to rebuild a mysql database? I need to move my database to a different server
     
No need to use PHP which also makes this OT but... Dump the data to a compressed file: shell> mysqldump --quick db_name | gzip > db_name.contents.gz Load it up into new machines db. shell> mysqladmin create db_name shell> gunzip < db_name.contents.gz | mysql db_name You could also directly transfer it: shell> mysqladmin -h 'other hostname' create db_name shell> mysqldump --opt db_name \
       | mysql -h 'other hostname' db_name


« previous php.general (#197458) next »