SQLSTATE[HY000] [2002] No such file or directory: This error keeps poping up. I have installed magento 2.3.5 version Please let me know how to fix this error
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Hi @baljinderekrocx,
You’ll most probably have to change the hostname from localhost to 127.0.0.1 in the env configuration file of your Magento application.
First, go to your Website’s DocumentRoot
Once inside open the config file
In there you’ll find an enviroment called host, change it like so
Save the file and reload the website to see if the error is still being experienced.
Regards, KFSys
Hello,
Once, can you check if the MySQL service is up and running. If it is down, you will need to restart.
You also may have to change the hostname from localhost to 127.0.0.1 in env configuration file in your magento root directory
Keep us posted, if this worked.
Cheers, Sri Charan