Backing up your HostGator database with CodeGuard is easy! For direct customers, this tutorial will show you exactly how to get your database backed up. If this tutorial is challenging for you, you could also back up your database through the HostGator-CodeGuard integration. Learn more about how to automatically add your HostGator websites and databases to CodeGuard.
Step 1: Find Database Credentials
You will need the following pieces of information to connect your database to CodeGuard:
- Database Hostname or IP
- Database Name
- MySQL Username and Password
- MySQL Port Number
If you have this information already, you can skip ahead to step 2.
Hostname: Your hostname will most likely be your domain name or the IP address of your server. You can find this information in your HostGator cPanel by logging in, and scrolling down the main page until you see this in the left sidebar.
Database Name: During the database addition process you will be able to select a database to back up from a list of the available databases. If you have more than one in your account you should determine ahead of time which database you would like to backup.
Username and Password: You need a MySQL username and password with permission to access the database you would like to backup. To create a new database user, first, click on the "MySQL Databases" icon in your cPanel dashboard.
Next, scroll down the page until you see a form for creating a new User. Fill out the form to create a new User.
After you have created a new User you will need to assign it to your website's database using the form directly below the previous form.
After using this form you will need to make sure that on the following page you give this User all of the User Privileges.
Port: The port for MySQL database connections is 3306 by default.
Now that you know your hostname/IP address, have a new User created for your database with all of the right privileges, and know what port to use, you are ready to connect your database to CodeGuard!
Step 2: Whitelist CodeGuard IP Addresses
Note: If you still haven't whitelisted our IP addresses, you will need to do this before attempting to connect your database. This can be done by clicking on the "Remote MySQL" icon in your cPanel dashboard.
Next, enter the following IP addresses one at a time into the input field on the following page, and select "Add Host."
- 54.236.233.46
- 54.236.233.28
- 54.174.91.34
- 54.174.153.212
- 54.174.115.171
Step 3: Add Database
Log into your CodeGuard account, and then follow the steps in this article to add your database to CodeGuard.