Error: Failed to get current SQL modes. Reason: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Issue Summary

Trying to run wp db query "SELECT COUNT(*) FROM $(wp db prefix)options WHERE option_name LIKE '%icl%'" without success.

Replication

Run wp db query "SELECT COUNT(*) FROM $(wp db prefix)options WHERE option_name LIKE '%icl%'"

Response bash-3.2$ wp db query "SELECT COUNT(*) FROM $(wp db prefix)options WHERE option_name LIKE '%icl%'" Error: Error establishing a database connection. Error: Failed to get current SQL modes. Reason: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

System Details

Latest local on macOS Big Sur 11.6.5

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.