Page 1 of 1

Transfer database

Posted: Mon Oct 27, 2003 1:17 pm
by gjb79
:?: Is there any quick and easy way to transfer the structure of an sql database from one server to a completly different server? I dont need the content, only the structure.

:arrow: However, I am interested in learning how to transfer structure and content over as well.

:wink: Thanks,

Posted: Mon Oct 27, 2003 1:57 pm
by MishaPappa
Different SQL database platforms provide different means of exporting selected table(s) structure, data or both.

If a MySQL database, an easy method is to use a tool like phpMyAdmin and perform a schema dump. This will allow you to generate a text file containing the DML commands for creating the structure of the source database/table(s). This command file would then simply be executed at the target either thru direct MySQL command UI or phpMyAdmin...

YMMV based upon the source database vendor -- Have you reviewed the manual for your particular product concerning schema dumps?

Ahh...

Posted: Mon Oct 27, 2003 2:00 pm
by gjb79
8O That makes since...

It is a mysql database with phpadmin on both servers.

I've always been afraid to use the dump commands as I fear it will dump all the information from the database, which is something I dont want to loose.

Thanks! :wink:

Posted: Mon Oct 27, 2003 2:02 pm
by scorphus
Take a look to MySQL-Front here.

MySQL-Front has a feature to create an SQL script from the DB structure. Do it in server A then run the script on server B either using MySQL-Front or mysql console application. You can use it to copy the content too. Hope it helps!

Regards,
Scorphus.

Thanks

Posted: Mon Oct 27, 2003 6:44 pm
by gjb79
Hey thanks a lot! Never knew it existed.

Mucho Thanks! :)

Posted: Mon Oct 27, 2003 7:51 pm
by MishaPappa
gib79 - I understand your trepidation in experimenting with a "dump" of the database... the verb is misleading and suggestive of bad things!

The first time I experimented with phpMyAdmin schema dumps, I made multiple full backups of everything... then realized afterwards it was unnecessary... good to err on the side of caution though.

Sometimes, you need to be fearless and try something... just remember wear protection and don't try this at home...

definately

Posted: Tue Oct 28, 2003 5:52 am
by gjb79
hehe yeah, thats true. Things are not always as they seem.

:lol: Yep I'll be wearing plenty of protection on this venture.


Thanks!