Many of our users back up MySQL databases, and many of those databases are managed in a shared hosting account using the cPanel admin interface. This is a quick tutorial on how to backup a MySQL database from a cPanel interface to any service that Backup Box supports. In general, Backup Box allows anyone to quickly and easily transfer files between online services, such as Dropbox, Box, Google Drive, SugarSync, FTP, SFTP, and Amazon S3. To date, Backup Box has moved over 100 million files for users across the globe!
For the purposes of this tutorial I will be using a Host Gator account that I set up. Host Gator sends us a lot of traffic from their forums so I thought it would be a good idea to give them some love.
Step 1a: Select the Remote MySQL option under the databases section of your cPanel home screen.

Step 1a: Click on the Remote MySQL icon
Step 1b: Add the Backup Box IP address as an Access Host. This will tell your server to let us connect. Our IP address as of January 1st, 2013 is 107.23.5.209. Alternately you can use a wildcard host of % but that will all any remote server to connect and it is a greater risk to security.

Step 1b: Add the Backup Box IP as an Access Host
Step 2a: Select the MySQL Databases option under the databases section of your cPanel home screen.

Step 2a: Click on the MySQL Databases icon
Step 2b: Ensure your database has a user with permission to Select and to Lock the table you wish to backup. The best practice for this is to create a new database user that is specifically used to backup your database and that can’t write, drop, or do anything else insecure to your database. For this tutorial I have created a user named ewarnke_tutorial.

Step 2b: Create a backup specific user
Step 2c: You will need to add the user to your database.

Step 2c: Add the user to your database
Step 2d: Finally set the right permissions for the user. If you just added the user it should ask you to set these, or you can click on the user name under the Current Databases section.

Step 2d: Set Lock and Select as the permissions for the backup user
Step 3: Find your host IP address on the cPanel home screen, it should be listed under Account Information. Mine was at the bottom-left of the screen. You will need to give Backup Box this IP address.

Step 3: Find the IP address of your hosting account
Step 4a: Log in or create a Backup Box account at https://mybackupbox.com. There is a completely free option that should be suitable for most websites. Backup Box charges for fancy features like automatic schedules, but you can do manual backups for free.
Step 4b: Once you have logged in you will need to add a new MySQL connector. Click the Click to Connect button to add a new one and then click the MySQL option. You will be presented with a form asking for the access details for your database.
- Display Name: Pick something useful.
- Server: Use the IP address from Step 3
- Port: The default 3306 should be fine unless you know it should be changed
- Username: The database user name that you created
- Password: The password for that database user
- Database Name: Optional, but you may specify the database you are connecting to
Step 4c: Your database should have loaded into the Backup Box interface. This will display all the tables you have access to. You can select a specific table or just leave it and we will backup everything.
Step 5a: You will need to select a destination for this backup. Dropbox is a great choice since they have free accounts and are industry leaders in the cloud storage space. Adding Dropbox is very simple, just select it as a destination connector and you will be prompted to enter a Display Name for it.
The process for adding Dropbox, Google Drive, SugarSync, Box, or pretty much any other cloud storage provider is practically the same.
Step 5b: A new window will open asking you to authorize your Dropbox (or other) account. Confirm your authorization and the window will close and then Backup Box will show you your Dropbox folders.

Step 5b: Authorize Dropbox!
Step 6: You should now see something like this, the Backup Box interface with your MySQL database on the left-hand (source) side and your Dropbox (or other) account on the right-hand (destination) side.
Step 7a: Time to make a transfer! You have some options:
- Archive and timestamp is an option that will put all your files into a ZIP file and put the current data and time on it before transferring. This applies to all transfers.
- Transfer Now, which will perform an immediate transfer of your database to Dropbox.
- Schedule for later, which lets you set specific times in the future to repeat this transfer, such as each night, or once a month. At the time of this writing, schedules are a paid feature.

Step 7a: Set your transfer options
Step 7b: If you are doing an immediate transfer then simply click on Transfer Now and it will bring up a confirmation dialogue box. If you are creating a schedule it will automatically save it and open up a list of all your scheduled transfers.
Success and confirmations: For the sake of this tutorial I ran an immediate transfer. My transfer log showed that my transfer was ongoing:
And then I received an email saying it worked! YAAAAAY!
For MySQL transfers we create a .dump file. This can be used to restore your database in the future if you ever have problems.
We made it this far, thanks for your patience. I should mention that Backup Box offers much more than MySQL to Dropbox. Any of our connectors can transfer to any other connector, the combinations are almost endless.
Visit Backup Box right now to get started.
We also offer paid accounts that help support our infrastructure and pay us to keep working on and improving this service. Some benefits of a paid account include the ability to schedule transfers, only transfer changed files, and a lot more bandwidth!
Please like us Facebook, say hi to us on Twitter, and add us on Google+!