Re: transferring data from one mySQL server to another?

From: Date: Fri, 01 Sep 2000 18:14:28 +0000
Subject: Re: transferring data from one mySQL server to another?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-2571@lists.php.net to get a copy of this message
Do you have access to the mysqldump command? Which is part of the normal mysql installation.. If so, you can do: mysqldump DATABASE_NAME > backupfile.sql and it will dump all the table structures and data (in INSERT statements) so then to read it in, you would just do: mysql DATABASE_NAME < backupfile.sql This is assuming you have telnet access to both hosts to run these commands, if not, I am not really sure what you would do except build all the table structures yourself and INSERT all the data (the above process but manually..) good luck /cody caughlan John Guynn wrote: > > I need to duplicate the data from one mySQL server (where my wife's domain > is hosted) to another machine (under my control) for backup and possible > relocation purposes. > > My biggest stumbling block is that I can't access either server remotely > (ie. I have to log into both mySQL servers using localhost as the host > name). I figure I can hard code the table building code without too many > problems. I can get all the data from the current web server and get it in > an array (at least I think I can) and I should be able to pull the code from > the array and insert it into the server under my control. The part I can't > figure out is the in-between part. Should I run a PHP script on the remote > (to me) server to write the data to a file (I've never tried writting data > with PHP), then ftp the file to me an run a PHP script locally to read in > the data or is there a better way? > > Any suggestions will be greatly appreciated. > > John Guynn > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- Cody Caughlan -codyc@cisco.com- Cisco Systems Web/Database Engineer phone: (408) 525-6029 Enterprise Line of Business pager: (408) 951-9949

« previous php.db (#2571) next »