Skip to content

Knowledgebase

Diagnosing database access denied after a hosting migration

cpanel-whm, development

An access-denied database error after migration usually points to the connection identity, password, host or grants. It differs from a timeout, missing database or unsupported SQL syntax, so preserve the exact message before changing settings.

Gather the details you will need

Locate the application’s active configuration file and the destination panel account. Keep a backup before editing and avoid exposing the password in screenshots or public diagnostic output.

01 Diagnose database access denied after a hosting migration

  1. Compare the full database and username in the application with Manage My Databases, including any changed account prefix.
  2. Confirm the intended user is assigned to that database and has the required privileges.
  3. Check the configured host against the destination service instructions. A migrated application may still point at the old server or an inappropriate localhost/socket route.
  4. If the password is uncertain, perform a coordinated reset or replacement-user rotation and update every consumer.
  5. Test through the application and a supported private diagnostic route, then clear only the relevant application configuration cache if its framework requires that.

Confirm the expected result

The application should connect to the expected destination and retrieve its real data. Confirm a controlled write works when the application needs write access.

If the problem continues

If a remote source is involved, check Remote Database Access and network policy separately. Do not grant every host or global privilege to make the error disappear. If the message mentions a missing extension or connection refusal, follow that evidence instead of resetting credentials again.

Why did the installer create a new empty site?

It may be connecting successfully to the wrong database or table prefix. Stop setup and compare the migrated tables before allowing an installer to overwrite or initialise application data.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support

Powered by WHMCompleteSolution