Welcome Guest, Not a member yet? Register   Sign In
I always get mysqli_sql_exception #2002
#4

For anyone else who may be stuck with this issue:

I have a similar setup: macOS, MAMP (non-Pro) running MySQL, individual Terminal tab/session running `php spark serve`. After hours of searching and debugging, I finally stumbled upon a StackOverflow question that solved this for me by changing "localhost" in "/app/Config/Database.php" to "127.0.0.1". Apparently, you have to define a socket if you want to use "localhost" and using "127.0.0.1" instead rides on the TCP/IP connection.

Here's the SO link:
https://stackoverflow.com/questions/4188...-directory
Reply


Messages In This Thread
RE: I always get mysqli_sql_exception #2002 - by dariusbaker - 06-14-2020, 01:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB