Quick answer
For a website database “Access denied” error, compare the complete database username, password, host and user-to-database assignment with the application's protected settings. A database and its login user are separate. Preserve the exact error and current configuration before changing a credential or permission.
Applies to
This guide is for an authorized Interactive Online cPanel account using the database tools enabled for its service. It covers MySQL-style database users and application connections. Your hosting login, customer-account login and website database user serve different purposes. Managed services or remote databases can have different host and access requirements.
Read the actual failure first
A sample error might say Access denied for user 'sample_app'@'localhost'. That is sample data, not an account to create. Record the real error privately, the affected website and when it appeared. An error saying a password was used does not establish that the password was correct. A timeout or connection-refused error needs a connectivity check as well.
Check names, assignment and application settings
- Open the exact hosting service and Databases > Manage My Databases. Older interfaces may call it MySQL Databases. Identify the existing database and user for this application before creating anything new.
- Compare the full database name and username, including the account prefix shown by cPanel. A short suffix copied from an older host can refer to the wrong identity. The database owner and the application's connection user are not automatically the same.
- Confirm that the intended user is assigned to the intended database. If the assignment is missing, use Add User To Database, select the exact user/database, choose Add, and select only the privileges the application requires. Save through Make Changes or the corresponding control shown by your version. Full privileges on this one database may be required by an installer; server-wide administrator access is unnecessary.
- Inspect the application's protected connection settings with authorized access. Compare the database name, user and host. For WordPress these are commonly
DB_NAME,DB_USERandDB_HOSTinwp-config.php. Keep the password and security keys private. Use the service's specified host rather than copying an old host or assuming every provider uses the same value. - If a database-user password must change, first identify every application using that user. Change it through the secure cPanel interface, save it in the protected configuration/password manager, and update each authorized dependent application. Do not print it in an error page or an AI prompt.
Choose the next check from the symptom
- Access denied began after moving hosts: compare full account-prefixed names, host and destination assignment. Keep the source configuration as private reference; do not connect the destination website back to an old database accidentally.
- Connection works but an operation is denied: review that application's required privileges on its assigned database. Avoid broad grants on unrelated databases.
- The user exists but is not assigned: add the relationship in cPanel. Recreating the database is not required to add an existing user.
- Missing database, table or data: verify the selected database and import state using the database import guide. Credentials alone do not create missing application tables.
- Connection refused or timed out: confirm the required host/port and supported service. Changing a database password cannot make an unreachable server respond.
Verify the application
Reopen the affected page and check the expected application function. A phpMyAdmin session opened through cPanel single sign-on does not prove the application's separate credentials work. Use the application's normal checks without printing connection secrets or leaving a public diagnostic script. Check other applications using a changed user too.
When to contact support
Contact support if the service is unavailable, assignment controls are missing, or the connection still fails after comparing settings. Include the domain, tool/application, change time/time zone, whether it followed a migration, and the exact redacted error. Provide relevant names privately only when needed for the investigation. Leave database exports, passwords and full configuration files out of the ticket body.
Related help
Official references
Content and official-source review: November 1, 2026. Available controls depend on your service, permissions and product version.