PDA

View Full Version : How do I upload a VERY large database?


SharkSpace_M
09-04-2006, 12:25 AM
If you cannot upload your database through cpanel or phpmyadmin (you will get a timeout error) the support department will have to upload it via shell. Your browser limits uploads to 300 seconds, and some databases are much too large to upload in that period of time.

Steps to get your database uploaded:

1) Make a backup of your database at your old host. The backup file needs to be a .sql file. The easiest method is to use phpmyadmin and export the database.

2) After you have downloaded the backup onto your computer, login to your ftp program and upload it to your home directory. The home directory is the folder that contains the public_html folder. It should be where your FTP program starts you.

3) After you have sussesfully uploaded your .sql database you will need to login to your cpanel and create the database and add a user to the database.

4) Next add your information into the shell command below:

mysql -u username_databaseuser -pyourpassword username_database <
/home/username/databasebackupfile.sql

Replace:
-- username with your cpanel username
-- databaseuser with the user you added to your database
-- yourpassword with the password you assigned for the user of the database
-- database with the database you created and assigned a user to

5) Copy and paste your edited command:

mysql -u username_databaseuser -pyourpassword username_database < /home/username/databasebackupfile.sql

into a support ticket and send it to the SharkSpace Support Department and your database will be uploaded for you.