faqts : Computers : Databases : MySQL : Installation and Setup : Replication

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 7 people (86%) answered Yes
Recently 5 of 6 people (83%) answered Yes

Entry

How can I update my development database with data from the production server?

May 18th, 2000 20:30
Nathan Wallace, indrek siitan


Does the information change in your internal database? if not, you can
just acquire the required privileges and run these 2 commands from a
machine that can access both the databases and has MySQL clients
installed:

  mysqldump --opt -uuser -ppasswd -hwebsite.host database > /some/file
  mysql -uuser -ppasswd -hinternal.host database < /some/file

that will dump the database into /some/file and load it into your local
mysql database. the file includes drop table statements, so it deletes
the local table (and all the information in it) before re-creating and
populating it.