Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy data from Database on server A to one on Server B

Status
Not open for further replies.

LittleSmudge

Programmer
Mar 18, 2002
2,848
GB
In an older version of MySQL that defaulted to MyISAM table types I could simply copy the contents of the MySQL/Data/DbName folder to a similar folder on another server and the MySQL on that server would, following a reboot, see the entire database.

Using the 4.1.12 version of MySQL the default is InnoDB tables ( and I do want to move to transaction save tables anyway ) - which do not respond to the same treatment.

How can I copy and entire database from one server to another ( this new server is at a different site, connected over the VPN )

Both servers are running MySQL 4.1.12 on a Windoz operating system.




G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
mysqldump --complete-insert --quick etc etc etc > database.sql, zip the file and copy over .

from a mysql prompt on the new server:
use database
\. /path/to/database.sql and watch it load.

*NOTE: if database doesnt exist, you will have to just create it

mysql> create database databasename

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Thanks KarveR - thats got me started.



G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top