Skip to content

Knowledgebase

Troubleshooting a CodeGuard database connection

backups, development

Connect the website's database as well as its files in CodeGuard. A database-driven site can have healthy file backups while its posts, orders or settings remain unprotected.

01 Add or repair database access

  1. Identify the database used by the live application from its approved configuration. Record its name and current host without exposing the password.
  2. Open the corresponding site in CodeGuard and choose Add Database, or edit the existing database connection.
  3. Enter the actual database endpoint and test the connection. Use direct access or a supported SSH tunnel according to the hosting service.
  4. Provide an authorised database user with the permissions required for the selected backup and restore workflow.
  5. Select the intended database and start a backup. Confirm completion separately from the website-file backup.

02 Verify the data

Inspect or download a sample backup in a restricted environment. Confirm expected tables and a recent non-sensitive record. A similarly named staging database can connect successfully while protecting the wrong site.

Common questions

Can I use localhost as the remote endpoint?

Localhost in the application's configuration can mean a database local to its server. CodeGuard needs the provider's supported remote endpoint or tunnel arrangement.

Should I expose the database publicly?

Use restricted access from the approved backup sources or the supported tunnel. Do not broadly open the database port merely to pass a test.

Why do files back up but the database fails?

They use different connection details and permissions. Check the database credential, host, network access and selected database independently.

After a host migration or database-password change, run another database backup and verify its timestamp. If no earlier successful database backup exists, CodeGuard cannot create one retroactively. Report the actual protection gap so the service owner can choose an appropriate next step.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support

Powered by WHMCompleteSolution