If you are getting a wordpress error that starts with “mysqli_real_connect(): (HY000/2002):” and includes “No such file or directory” and ends with “wp-includes/wp-db.php on line 1490”, then here is what resolved the issue for me.
In the wp-config.php file, include (or change) this line from
I put it near the top. Hopefully this will help someone.
leave a comment : )