I get a socket failure when I use the wp db commands.
For example, following ‘Open Site Shell’:
wp user list works perfectly
wp db check fails with:
mysqlcheck: Got error: 2002: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2) when trying to connect
EDIT:
Specifying the socket as defined in the shell config works: wp db check --socket=$HOME/Library/Application\ Support/Local/run/HLRhEyzsF/mysql/mysqld.sock
This is still an issue. Using Local 5.4.1+3311 which I downloaded and installed fresh today. Trying to connect to the database using Sequel Pro also fails. (This worked flawlessly in 3.x, which I’ve been using until now.) The suggestion by pragmatictom doesn’t work for me.
Hey @pragmatictom – I’m having issues replicating this on my end, with Local 5.7.4 on macOS Catalina 10.15.5.
What OS version is installed, and what version of Local are you using?
If you’ve installed a new version of Local, have you tried exporting the site and re-importing it into a new one to see if that refreshes things?
Another thing to consider is if there’s some sort of PATH pollution going on. Do you have mysql installed on your host machine? Are there any custom configurations you have in place for mysql?