PDA

View Full Version : MySQL Transfer


VirtualChicano
October 30th, 2004, 01:16 PM
hello,

I was wondering if someone here could help me. I have a search engine with 500+ links. I am pretty well versed on c-panel and php my admin and I'm well seasoned as a webmaster.

I do have a weak point, however, and i need to resolve this before I can move my site(s) over to your server. In short, I have never transfered a MySQL data base from one server to another. I can create, populate, even bridge but not move a MySQL. I believe it has to do with backing up and restoring but I do not know how to go about this.

Any suggestions?

Best Regards,
Daniel

12Wonder
October 30th, 2004, 04:33 PM
If your current host is running cpanel we can probably do a straight server-to-server transfer of everything. We would just need the username, password, and ip of your current account (don't post it here, submit a support request at http://www.12wonderwebservices.com/helpdesk.php instead). This is usually fairly quick and painless, as the entire site, databases, etc. are simply copied over, permissions and all.

Otherwise there are a couple of ways you can backup and restore your mysql db's.
1) You can go to cPanel -> Backup and then on the right side of the page click the mysql database you want to backup. (see screenshot here: http://www.12wonderhosting.com/backupmanager_cp.html). Just save it to somewhere on your own computer's hard drive. To restore the db, go to cpanel -> backup and click Restore mysql database, browse to where you saved the file, and click Upload.

2) You can also backup your mysql databases via phpmyadmin (cPanel -> MySql Databases -> phpmyadmin at the bottom of the page). On the left side of the phymyadmin page, select the database you want to save/backup. Then click the "Export" tab.
On the Export page, under "Export": click 'Select All', and select the 'SQL' radio button. Under "SQL Options", check 'Structure', 'Add/Drop Table' and 'Data', 'Complete Inserts', 'Use hexadecimal for binary fields'. Then check "Save as File", Compression "gzipped". You don't have to fill anything in the File Name Template field, but you can leave "Remember template" checked if you want (doesn't really matter).

The MySQL database can then be restored either from cPanel -> Backup -> Restore MySQL Database, or from phpmyadmin -> MySQL (the tab next to the Export tab) -> Browse (to your saved gzipped file).

That's it. Don't forget to save a backup of your Home Directory on your old server as well as a backup of your MySQL database/s. Careful with this, as "Generate Full Backup" does NOT save your actual files, just your settings. To get all your files you need to use the Home Directory backup.

Anne