<p>Can someone help me solve for this error message: An exception has been thrown during the rendering of a template (&quot;Craft can't connect to the database with the credentials in craft/config/db.php.&quot;) in &quot;components/site-header/_site-header&quot; at line 23.</p>
<p>I am not a developer and can't seem to access back-end of site, either.</p>
<p>This is error message I received there when trying to log in:</p>
<p><em>Craft can’t connect to the database with the credentials in craft/config/db.php.
The above error occurred when the Web server was processing your request.
If you think this is a server error, please contact the webmaster.
Thank you.</em></p>
<p>I am afraid I don't know where to start!</p>
<p>Thank you!</p>

CC BY-SA 4.0
2021-11-12T00:12:09.533Z
Did this just start happening all of a sudden? If so, it sounds like your hosting provider may be having some trouble with their database server. Unless it ends up being an availability issue (i.e. the host restores service after a period of time), this isn't something that can be corrected without access to the files on the server itself, or (likely) without the help of a developer. Next steps should probably be reaching out to the host or the original developer of the site. In the process, please don't disclose any sensitive information like URLs, passwords, or keys!
August Miller
CC BY-SA 4.0
2022-01-03T20:23:09.483Z
There’s also a Knowledge Base Article that may be helpful: https://craftcms.com/knowledge-base/troubleshooting-database-connection-issues
Matt Stein
<database><error><server>
Can someone help me solve for this error message: "Craft can't connect to the database with the credentials...."
# Can someone help me solve for this error message: "Craft can't connect to the database with the credentials...."

(Asked by: username_0 on 2021-11-11)

Can someone help me solve for this error message: An exception has been thrown during the rendering of a template ("Craft can't connect to the database with the credentials in craft/config/db.php.") in "components/site-header/\_site-header" at line 23.

I am not a developer and can't seem to access back-end of site, either.

This is error message I received there when trying to log in:

*Craft can’t connect to the database with the credentials in craft/config/db.php.
The above error occurred when the Web server was processing your request.
If you think this is a server error, please contact the webmaster.
Thank you.*

I am afraid I don't know where to start!

Thank you!

**Tags:** database, error, server

> **Comments:**
> **username_1**: Did this just start happening all of a sudden? If so, it sounds like your hosting provider may be having some trouble with their database server. Unless it ends up being an availability issue (i.e. the host restores service after a period of time), this isn't something that can be corrected without access to the files on the server itself, or (likely) without the help of a developer. Next steps should probably be reaching out to the host or the original developer of the site. In the process, please don't disclose any sensitive information like URLs, passwords, or keys!  
> **username_2**: There’s also a Knowledge Base Article that may be helpful: https://craftcms.com/knowledge-base/troubleshooting-database-connection-issues  

---

## 0 answers

