Cat error log when mysqld fails to start#5323
Conversation
Signed-off-by: Morgan Tocker <tocker@gmail.com>
|
Note to reviewers: I can see this as being potentially problematic if the MySQL error log is very large (for example after several restarts, the log file is never rotated and eventually there is a failure). I am open to suggestions on how to handle. For example, if the mysql error log is over 4096 bytes, we could print an error saying |
enisoc
left a comment
There was a problem hiding this comment.
I can see how this will help UX, but at a technical level I don't think hooking it up this way is going to be resilient to the wide range of ways people use Vitess (see below for an example). I also share the concern you had about the log potentially being large.
As an alternative, perhaps we could:
- Document that a good way to make mysqld errors more discoverable is to configure the error log to be a symlink to
/dev/stderr. This causes mysqlctld to automatically reflect everything mysqld logs into its own logs (since we capture it via a pipe), making it easier to see what's happening and how everything correlates in time. - Change all our local and k8s examples to do the above by default.
Signed-off-by: Morgan Tocker <tocker@gmail.com>
Signed-off-by: Morgan Tocker <tocker@gmail.com>
Signed-off-by: Morgan Tocker <tocker@gmail.com>
Signed-off-by: Morgan Tocker <tocker@gmail.com>
I have debugged a number of user issues, where the underlying cause is written to the mysqld error log.. but the user does not realize they have to read this log. Examples include:
Here is an example showing this feature with a bad my.cnf file:
Signed-off-by: Morgan Tocker tocker@gmail.com