Lately, I have been getting many warnings on my MySQL Server, getting into some crashes and restarting.
I looked at the status of MySQL and found the logs stating,
To analyse this correctly, I looked at the MySQL logs at /var/log/mysql directory.
However, log rotation was enabled, compressing the previous log files.
To read all of these files means I will have to extract each one and then open them.
But there is a better way, using the command zcat
To use this command, you need to pass on the path of the gzip file as the argument.
zcat /var/log/mysql/error.log.1.gz
Latest posts by Anubhav Ranjan (see all)
- Use TOTP for securing API Requests - July 12, 2024
- Backup Files from Ubuntu to Azure - December 14, 2023
- Read Gzip Log Files without Extracting - June 13, 2023