
But my mysql database is about 20MB, How can I import my database?
I contact the Hostmonster Livechat, its staff tells me 2 methods:
1. What you'll need to do is upload the .sql file to the Home Directory (the folder before public_html) Then create a ticket with Site/Script compatibility. They are importing databases that are too large for you. Create the ticket there, give the name of the database and name of the .sql file to import and they will do this.
2.You can import it through SSH. To obtain SSH access, we just need you to make a ticket, where you attach a copy of your driver's license, passport, or other official government-issued Photo ID.
OK, now you can import your big mysql database follow Hostmonster staff's introduction.
BUT I have another method: using the Cron Jobs.
1. Use FTP upload your temp.sql or temp.sql.gz to the Home Directory.
2. Login into your CPanel, find the icon of Cron Jobs, SET it. Because we just need the cron job run a time, so we set it execute Cron Jobs after 2 minutes.
3、Command as below:
mysql -hhostname -uusername -ppassword databasename < backupfile.sql
If your database is sql.gz, you can use this command:
gunzip < backupfile.sql.gz | mysql -uusername -ppassword databasename
OK, that's it.
