Knowledge Base

How to manually add your Bluehost database to CodeGuard

Overview

By the end of this article you will have a Bluehost-hosted MySQL database connected to CodeGuard and running its first backup. The article covers four stages in order: collecting your database details, which are the hostname, database name, username, password, and port; creating a MySQL user, a dedicated database account with full privileges that CodeGuard uses to connect; connecting from CodeGuard, where you enter those details in your dashboard; and verifying the first backup. Two terms recur throughout: the control panel Uniform Resource Locator (URL), which doubles as your database hostname, and the username prefix, which Bluehost adds automatically to every MySQL user you create.

Before you begin

You will need the following:

  • Access to your Bluehost hosting account.
  • Access to your CodeGuard account.
  • The name of each database you want to back up.
  • Permission to create a MySQL user in your Bluehost account.

You will collect four pieces of information as you work through this article:

  • Database hostname or IP address
  • Database name
  • MySQL username and password
  • MySQL port number

Step 1: Find your Bluehost hostname

  • Sign in to your Bluehost hosting account.
     
    Figure 1: Bluehost account sign-in page
  • Select the Advanced tab on the left side of the screen.
     
    Figure 2: Bluehost dashboard with the Advanced tab in the left navigation
  • Note the URL shown in your browser's address bar for the control panel. This URL is the hostname CodeGuard needs.
     
    Figure 3: Bluehost control panel with the address bar URL used as the database hostname

Step 2: Create a MySQL user

Create a dedicated MySQL user for CodeGuard rather than reusing an existing one, so the connection can be managed and revoked independently.

  • In the Databases section of the control panel, select MySQL Databases.
     
    Figure 4: Bluehost control panel Databases section with the MySQL Databases option

  • Scroll to Add New User. Enter a username and a strong password, then select Create User.
     
    Figure 5: Add New User form with username and password fields and the Create User button

  • Note the full username. Bluehost adds your account prefix automatically, so a user entered as cguser becomes something like accountprefix_cguser. Use the full prefixed name when connecting from CodeGuard.
  • Select Go Back.
     
    Figure 6: Confirmation that the MySQL user was created, with the Go Back link

Step 3: Assign the user to your databases

Repeat this step for every database you plan to back up.

  • Scroll to Add User To Database. Select the user you created and the database from the dropdown menus, then select Add.
      
    Figure 7: Add User To Database section with user and database dropdown menus

  • Grant all privileges to the user. CodeGuard requires full privileges to back up and restore the database.
      
    Figure 8: Manage User Privileges page with the All Privileges option selected

  • When the success notice appears, select Go Back.
     
    Figure 9: Success notice confirming privileges were granted, with the Go Back link

  • Confirm the user now appears against the database in the Current Databases list. If you have more than one database, repeat steps 1 to 3 for each.
     
    Figure 10: Current Databases list showing the MySQL user assigned to the database

Step 4: Sign in to CodeGuard

  • Select the Account icon, then select Products from the dropdown menu.
     
    Figure 11: Account menu opened with the Products option
  • Next to your CodeGuard plan name, select Log in. Alt text: Products page with the Log in link beside the CodeGuard plan

Step 5: Add the database in CodeGuard

  • Scroll to My Sites in your CodeGuard dashboard, select the Actions dropdown beside your website, and select Add Database.
     
    Figure 12:
    CodeGuard My Sites section with the Actions dropdown and Add Database option

  • Enter the hostname you noted in Step 1, then select Test Connection.

     
    Figure 13:
    Add Database form with the hostname field and Test Connection button

  • CodeGuard checks that no firewall rules are blocking its IP addresses. When all checks pass, select Next Step.
     
    Figure 14:
    Connection test results showing firewall checks passed

  • Skip the IP allow-list step. Bluehost already permits CodeGuard IP addresses, so no action is needed. Select Next Step.
     
    Figure 15: IP allow-list step that Bluehost customers can skip

  • Enter the full prefixed MySQL username and password you created in Step 2, then select Next Step.
     
    Figure 16: Database credentials form with MySQL username and password fields

  • Select the databases you want to back up from the list, or select Select All, then select Add Databases.
     
    Figure 17: List of available databases with selection checkboxes and the Add Databases button

Step 6: Verify the first backup

The database backup begins immediately after you add it.

  • A progress tracker shows each stage of the initial backup. You do not need to stay on the page; CodeGuard sends an email when the backup finishes.
      
    Figure 18: Initial backup progress tracker showing the current stage
  • When the backup completes, the first version appears against the database in your dashboard.
      
    Figure 19: CodeGuard dashboard showing the first completed database backup version

The database is connected correctly when all three of the following are true: the database is listed in your CodeGuard dashboard, the initial backup has completed without a connection error, and a first backup version is available.

Troubleshooting

The connection test fails.

Confirm you entered the full prefixed MySQL username, not the short name you typed into Bluehost. Confirm the password is correct by signing in with it in the Bluehost control panel.

A database does not appear in the selection list.

The MySQL user has not been assigned to that database. Return to Step 3 and add the user to the missing database.

The backup fails after the database is added.

The MySQL user may not have all privileges. Return to Step 3 and confirm full privileges are granted.

If the problem persists, contact Sectigo support.

Similar questions

  • How do I back up a Bluehost MySQL database with CodeGuard?
  • What MySQL user permissions does CodeGuard need?
  • Why does my Bluehost MySQL username have a prefix?
  • How do I add a database to an existing CodeGuard website?

Need assistance?

Contact our team for help with your purchase or issuing your certificate.

Live chat

Call us today