Re: Best way to take a copy of a Database from Server to server
| From: | Daniel Rezny | Date: | Tue, 07 Aug 2001 13:34:16 +0000 |
| Subject: | Re: Best way to take a copy of a Database from Server to server | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-61612@lists.php.net to get a copy of this message | ||
Hello elias,
Tuesday, August 07, 2001, 3:52:57 PM, you wrote:
e> Hello.
e> I have two MySql databases running on different servers. I have no root
e> access and only PHP + Mysql and MysqlAdmin.
e> How can i take a dump of first database (which is about 1MB) and restore
e> that dump on the second one?
e> Actually, I'm doing a structure dump, but the outputed SQL text is very
e> big!..I'm not able to paste it all in the second server's sql query textbox.
You can do it from your machine with mysqldump.
syntax is:
mysqldump --host=here_write_sql_server_1 --user=user
--password=hassword name_of_database > file.txt
On the second server you can do it with command
mysql --host=here_write_sql_server_2 --user=user
--password=hassword name_of_database < file.txt
I hope it helps
--
Best regards,
Daniel mailto:daniel@rezny.sk