This article describes how to backup a new database.
Backing up your MySQL database is now easy, reliable, and secure with CodeGuard!
Step 1: Find Your Database Information
You will need to find the following information:
- 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.
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 back up.
Username and Password: You need a MySQL username and password with permission to access the database you would like to back up. If you are unsure of these credentials, check with your host about how to add another user specifically for CodeGuard.
Port: The port for MySQL database connections is 3306 by default.
Step 2: Add Your Database
a) Begin by navigating to your website dashboard on CodeGuard.com by visiting https://codeguard.com/websites and clicking on the name of the website that you would like to associate with your database. This will bring you to the website monitoring page. Next, scroll down and click on the "Add Database" link at the bottom of the page.
b) Enter the "Database Hostname or IP" for your database. This is the same hostname you found in step 1. Once you have entered your hostname or IP, click the TEST CONNECTION button, and CodeGuard will attempt to connect to the database.
c) If the connection fails, you may need to whitelist the CodeGuard IP addresses (see this support article for more information) or your hosting provider may not allow direct database connections. Alternatively, if you have SSH access to your website, you may be able to connect to the database that way. Contact your hosting provider if you are not sure whether you have SSH access. Once you've whitelisted our IP addresses all checks pass, click "NEXT STEP".
d) Again, it is very important that all of our IP addresses have been properly whitelisted. If each of the IP addresses listed is not whitelisted, it is very likely that our connection attempts will be blocked by your hosting provider. If you've properly whitelisted each of the IP addresses, click "NEXT STEP".
e) Add your credentials. Enter in the information you found in step 1. If your hosting provider supports ssh access, you may also enter your ssh credentials. Once you have entered the correct information, click the NEXT STEP button to select your website database.
f) Finally, select the database you would like to add and click ADD DATABASES to begin backing up your database. If your MySQL user has access to multiple databases, you will see a list here of each of the databases. You can select multiple databases on this screen to add them all at once. If your user does not have access to all of the databases that you need to be backed up, you will need to repeat this entire process for each database.You can then watch the progress of the database backup on CodeGuard.
That's it! You can watch the progress of the database backup on the next page. Your website's database is now securely and reliably backed up with CodeGuard every day.