Skip to content
Advertisement

Getting error mysqli::real_connect(): (HY000/2002): No such file or directory when I try to access my project on live server

I had uploaded my website to server and then I tried to access, but the code igniter returns me that error that I don’t find any answer. Why is this happening?

My config database is set like:

JavaScript

Advertisement

Answer

MySQL connection driver does not get any meaningful server at the location of localhost. So use,

JavaScript

rather than

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement