Cannot connect to the database

A checklist for login failures, timeouts and certificate errors.

Work through this checklist from the top. It covers the reasons behind nearly all database connection problems our support sees.

1. Are you using the right server address?

Connecting from Server address
A website hosted with us The local address from the local connection string
Your computer or another server The public address, e.g. dbXXXX.public.databaseasp.net

An error such as "A network-related or instance-specific error occurred… The server was not found or was not accessible" from your own computer usually means you used the local address, or that remote access is not enabled.

2. Is remote access enabled?

Remote access is disabled by default. Enable it in the Control Panel before connecting from outside — see Allow remote access to a database.

3. Are the login and password correct?

"Login failed for user" means the server was reached but rejected the credentials. Copy the login and password from the Control Panel (Databases → your database → Users) instead of typing them. If you changed the password, update it in your application as well.

4. Is your IP address blocked?

After several failed logins your IP address is blocked for 24 hours. Check Automated Security Protection on the Users page of the database — see Database connection blocked after failed logins.

5. Can your network reach the server?

Open http://dbXXXX.public.databaseasp.net (your public server address) in a browser. The green message Server is online means the path is open. If the page does not load, a firewall, router or internet provider on your side is blocking the connection — try a different network.

6. Certificate errors

For "The certificate chain was issued by an authority that is not trusted" add TrustServerCertificate=True to the connection string (or tick Trust server certificate in SSMS). The connection stays encrypted.

7. Do the website and the database belong to the same plan?

A Premium website cannot connect to a Free database with the local connection string, and the other way round. Free and Premium hosting are separate environments.

8. Does the database still exist?

If the application worked and suddenly reports that the database cannot be opened, check that it was not deleted by a script: Database disappeared or was deleted. Free databases that are not used for 6 months are archived.

Still not working?

Open a support ticket and include the exact error message and your public IP address (you can find it at whatismyip.com).

Still stuck? Our support team is happy to help.
Ask the community Open a support ticket