Re: how to move database from one server to another
| From: | Kevin Waterson | Date: | Sun, 09 Feb 2003 04:27:07 +0000 |
| Subject: | Re: how to move database from one server to another | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-134939@lists.php.net to get a copy of this message | ||
This one time, at band camp,
"Sunfire" <rusty_81@msn.com> wrote:
> how do you copy a database from a server over to another.. do all i need to
> do is copy the tables over to the sql server after i make the db? or is it
> more involved than that..
assuming you are using MySQL....
mysqldump [dbname] > dbname.sql -u [db_username] -p
This will give you a file called dbname.sql. On the second machine you use this
file to create the second db...
mysqladmin create db_two -u [db2_username] -p
mysql db_two < dbname.sql -u [db_two] -p
hope this helps
Kevin
--
______
(_____ \
_____) ) ____ ____ ____ ____
| ____/ / _ ) / _ | / ___) / _ )
| | ( (/ / ( ( | |( (___ ( (/ /
|_| \____) \_||_| \____) \____)
Kevin Waterson
Port Macquarie, Australia