Issue Summary
I’ve tried setting up unit tests with WP-CLI in the Local shell, however I’ve hit a roadblock. I can’t connect to the database because of the socket file path.
Troubleshooting Questions
This happens in all sites on local.
Replication
- Open site in Local shell.
- Try to run
bash bin/install-wp-tests.sh wordpress_test root root localhost:/Users/SebKay/Library/Application Support/Local/run/u5SMXQmdv/mysql/mysqld.sock latest
(but change it to the correct path for you setup). - Get the following error
error: 'Can't connect to local MySQL server through socket '/Users/SebKay/Library/Application' (2)'
As you can see, it’s cutting off the path after /Users/SebKay/Library/Application
, but it should actually be /Users/SebKay/Library/Application Support/Local/run/u5SMXQmdv/mysql/mysqld.sock
.
I’ve tried all manner of things, like the classic backslash /Application\ Support
, but nothing is working.
Any ideas?
System Details
-
Which version of Local is being used?
- 5.9.0+4961
-
What Operating System (OS) and OS version is being used?
- macOS Catalina.