Database connection error
2 min read
A database connection error means the application cannot establish the connection it needs to its database service.
The message itself may not identify the exact cause, so troubleshoot the connection systematically and keep all credentials private.
Common causes #
Possible causes include:
- an incorrect database name
- an incorrect database username
- an incorrect database password
- an incorrect database host or server address
- the database service being unavailable
- the database user not having the access required by the application
- the application or server being unable to reach the database host
- database configuration changing after installation
- a hosting or server migration changing connection details
The exact configuration method varies by DotwebApps product and hosting environment.
Safe diagnostic steps #
- Confirm that the expected database exists.
- Confirm that the assigned database user exists.
- Verify the connection values using the configuration method documented for the specific DotwebApps product.
- Confirm through the hosting or server environment that the database service is available.
- Confirm that the application environment can reach the database host.
- Check whether the issue started after a hosting migration, database-password change, server change, or configuration update.
- Review the relevant application or server error message with credentials and other sensitive data removed.
Do not assume a universal database host, port, configuration filename, environment-variable name, or connection method. These details depend on the product and hosting environment.
Protect database credentials #
Database credentials are sensitive. Do not:
- post database passwords publicly
- include passwords or full connection strings in screenshots
- send database credentials in public support messages
- switch to a highly privileged or root database account merely to bypass a permission problem
- run unverified SQL commands as a troubleshooting shortcut
DotwebApps support should not need your database password to begin investigating a connection problem.
Related guidance #
See Database configuration for general database setup guidance and Server requirements for hosting-environment checks.
If the error remains unresolved #
Contact DotwebApps support with the product name, the hosting/server environment, the step where the error occurs, whether anything recently changed, and the exact error message with secrets removed.
Never send passwords, database passwords, private keys, API secrets, payment-card details, unrelated customer data, or full source code. See How to get support for the recommended support path.