Why am I getting an error connecting to my database?

Last updated October 16, 2025

We typically see this happen if the Webdock server has completely run out of disk space. You will see a message along the lines of “Error establishing database connection” or “mysqli::real_connect(): (HY000/2002): No such file or directory“.

Start by checking that your server has any free disk space left. If it has run out of disk, an easy way to fix this error is by scaling up your server, then clean up any files using our handy guide and finally scale down the server again. If you do this within 24 hours, this will not cost you a thing due to how our billing system works.

Of course, this error can also show if you have supplied wrong credentials to your application config for your database – in which case, chech that the db name, server (usually “localhost”) and username /password are correct. You can usually check this manually by logging in to phpmyadmin with the username and password you are using and check if that user has access to the database you want on your server.

Related Articles

Content
expand_more
chat box icon
Close
combined chatbox icon

Welcome to our Chatbox

Reach out to our Support Team or chat with our AI Assistant for quick and accurate answers.
webdockThe Webdock AI Assistant is good for...
webdockChatting with Support is good for...