SQLSTATE [HY000] [2002] No such file or directory error

Linode Staff

I'm trying to setup my Magento site and keep receiving the following errors:

SQLSTATE [HY000] [2002] No such file or directory error

Then it lists a lot of files that it cannot find. Please help.

1 Reply

Hey there,

This looks like you either did not setup your phpinfo.php file at all/not correctly or MySQL isn't working.

I found this dev doc page from Magento that helps explain what is happening. It looks like there is a php configurations error. It cannot find your SQL. You most likely need to either setup or edit your phpinfo.php file.

I found some other great info on the Magento Stack Exchange Page

If the file is correct then you need may need to restart MySQL. You can check if its running with the following command:

 systemctl status mysql

If its not running then you can run the following command:

 sudo systemctl restart mysql

Hope this helps!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct