More comprehensive logs during mysql initialization #385
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.
More comprehensive logs during mysql initialization and also visible error messages.
The idea came when I faced a problem with initialization of magento:
There were two solutions on the internet to remove MYSQL_HOST from environment variables and to remove memory limit for docker container both of which was not the case for me. I read through the init script to realize that it tries to send a simple select 1 to the mysql and if it fails it thinks the mysql is still initializing. So continues to retry. When I tried the same select command manually:
I just realized that it's an error with my config file. So far so good. But:
Isn't it better for the init script to show the actual error message of mysql when it is retrying?
This feature can save hours of frustration for developers. That is why I prepared this pull request.