You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@continuum.apache.org by Ryan Slobojan <rs...@babycenter.com> on 2006/09/27 00:17:21 UTC

Database rebuilding process

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



Re: Database rebuilding process

Posted by Wayne Fay <wa...@gmail.com>.
Hi Ryan,

Did you mean to send this to Continuum-Users? I think not...

Wayne

On 9/26/06, Ryan Slobojan <rs...@babycenter.com> wrote:
> 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
>
>
>
>