I always get mysqli_sql_exception #2002 |
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 |
Messages In This Thread |
I always get mysqli_sql_exception #2002 - by sebgates - 06-01-2020, 06:58 AM
RE: I always get mysqli_sql_exception #2002 - by jreklund - 06-01-2020, 02:19 PM
RE: I always get mysqli_sql_exception #2002 - by sebgates - 06-02-2020, 02:50 AM
RE: I always get mysqli_sql_exception #2002 - by dariusbaker - 06-14-2020, 01:53 AM
|