Hi,
I've come up with a sequence that we can use for exporting data and
structure separately from a MySQL database, and importing the same data
and structure into a local MySQL database. For the same of these
examples, we'll assume that the remote database is named 'test' and
resides on SFDev-4, and that the user is 'dvbrowse' with password
'l00katme'
Export database structure from remote database
mysqldump -u dvbrowse --password=l00katme -h sfdev-4 -C -d -r test.sql
test
Export database data from remote database
mysqldump -u dvbrowse --password=l00katme -h sfdev-4 -c -C -K -e -n -t
-q -r test-data.sql test
Import structure/Rebuild local database
mysql -u root --password=n3wb4by test < test.sql
Import data into local database
mysql -u root --password=n3wb4by test < test-data.sql
Thanks,
Ryan Slobojan
|