In this article, we are going to show you how to backup your HostGator VPS or Dedicated Server Database.
To backup your HostGator VPS or Dedicated Server Database, you will need the following information:
Step 1: Log into HostGator
First, we need to log into the HostGator cPanel. If you aren’t sure how to log into your cPanel, please see this support article.
Step 2: Whitelist CodeGuard’s IP addresses
a) From your cPanel, click “Remote MySQL”
b) Enter the following IP addresses into the “Add Access Host” field:
- codeguard.com - US region:
- de.codeguard.com - Germany region:
- uk.codeguard.com - United Kingdom region:
- fr.codeguard.com - France region:
Step 3: View Your MySQL Databases
Click “MySQL Databases” from your cPanel home screen.
Step 4: Create a new CodeGuard MySQL user & assign to your database
a) Create a new user. Take note of the username and password you use here.
b) Assign your user to the database
c) Grant the new user all permissions
Step 5: Gather MySQL Database & User Information
On this screen, you can gather your database hostname, MySQL username, and database name. The hostname is the beginning of the URL as outlined in the screenshot.
Step 6: Activate Database in CodeGuard
a) Now that we've whitelisted the IP address and gathered the information we need, login to your CodeGuard account and select the website your database is associated with.
b) Click 'Databases' underneath the URL of your website
c) Click ‘Add Database’
d) Test your connection by entering the database hostname and clicking 'Test Connection'
e) Check for firewalls. If either of the IP addresses listed on the next screen fails, make sure that you've properly whitelisted all of our IP addresses in Step 2. If they both pass, click 'Next Step'
f) Again, please make sure that all of the IP addresses listed have been whitelisted. It may seem like we're repeating ourselves, but we can't stress enough how important it is to whitelist all of our IP addresses. Whitelisting all our IP addresses ensures that we are able to connect to your database every time to take your backups. If you've confirmed that all IP addresses have been whitelisted by following the instructions in Step 2, click 'Next Step'
g) Enter your database credentials and click 'Next Step'. The MySQL Port is typically 3306. If you haven’t changed any settings for your port number, this is usually what it will be. If you’ve changed your port number and can’t remember what it is, or if you can’t remember if you’ve changed it or not, contact HostGator, and they will be able to confirm your port number for you. If you're having any trouble locating your credentials, please use the sample email in the help box to the right to send to your hosting provider. They will be able to assist you in gathering the correct credentials.
h) Select your database and click 'Add Database'. If your MySQL user has access to more than one database, they will all show up in this list.
i) Success! You've now added your HostGator VPS or Dedicated Server database! You can track your progress while your database is added. CodeGuard will send you an email once it's completed.
If you run into any issues during the activation of your database, please contact CodeGuard Support, and our support team will help you get your HostGator VPS or Dedicated Server database up and running in no time!