-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clean, create, drop, reset subcommands not working with --defaults
flag
#185
Comments
I also just experienced this with https://all-inkl.com/ hosting. Problem also seems to be that the socket as defined in As a quick workaround adding a If I can provide any further information to help let me know. |
Sorry, it seems as if the hoster fixed the issue on their side in the meantime. Since I can't reproduce the original issue I also can't check if your fix solved it, sorry! 😞 |
Thanks for taking a crack at this @schlessera ! It looks like the
Here's a recorded screencast of me doing the QA in case it helps give more context: |
It seems that the problem happens when running |
Seeing this with |
Bug Report
Describe the current, buggy behavior
When using wpcli in an environment that needs the
--defaults
flag (like Local ), theclean
,create
,drop
, andreset
subcommands are not working.When running these commands, I get this error within the terminal:
The problem is that the above socket (
/tmp/mysql.sock
) isn't the correct one for the environment. Here are some details from my site's terminal session:Describe how other contributors can replicate this bug
You might be able to replicate by having a custom MySQL config and using the
--defaults
flag, but the easiest way I know is to use Local:clean
,create
,drop
, orreset
Describe what you would expect as the correct outcome
I would expect that all
db
subcommands should work by being able to use the same socket connection.Let us know what environment you are running this on
Provide a possible solution
Taking a look at those functions that produce errors, it seems like maybe they need to be refactored to not use
$this->run_query(...
I'm new to the wpcli project, so I might see if I can get something working, but if anyone has pointers, I'd love to learn more!
Provide additional context/Screenshots
It looks like this is related to the with the work done in #157 however, a few subcommands weren't covered.
The text was updated successfully, but these errors were encountered: