this php code works in localhost but not on server?

前端 未结 1 873
说谎
说谎 2020-12-22 05:57

we are making an collage project that is about to store website name , category , and details so we are done with website and now we want to make app that will communicate w

相关标签:
1条回答
  • 2020-12-22 06:46

    I have encountered similiar issues in the past. You should try changing localhost to 127.0.0.1, assuming your MySQL server is running on the same box.

    My belief is that the issue that you are encountering is that "localhost" uses a UNIX socket and can not find the database in the standard directory. However "127.0.0.1" uses TCP , which essentially means it runs through the "local internet" on the machine, being much more reliable than a UNIX socket.

    0 讨论(0)
提交回复
热议问题