Force search /usr/sbin for mysqld #5506
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is not the most elegant patch, but it's quite possible that a user's
PATH
does not include/usr/sbin
. This is the default location for mysqld, and we don't strictly need to be a super-user to run it, because we use different directories and ports to the default.I manually tested this on an Ubuntu 19.10 VM by removing
/sbin
and/usr/sbin
fromPATH
, and it was able to run the local example.This issue was reported by Emi & @PrismaPhonic. It is technically a regression of #5488 which removed the following lines from
dev.env
:Technically this was looking at the path for the mysql client though, and did not guarantee that the server package was installed. It is the server package which is needed, so overall this is an improvement, but longer term there should be a dependency-check. I am working on one in #5382 but it will take some time to complete before merging.
Signed-off-by: Morgan Tocker [email protected]