Skip to main content

MySQL log High usage

Comments

6 comments

  • kodeslogic
    A 42GB MySQL log file (mysqld.log) is unusually large and might indicate an issue with your MySQL server's logging settings or database activity. Log files are used to record various events and activities in MySQL, and they can grow over time depending on the level of logging enabled and the amount of activity on the server.
    • If the log file contains valuable information for debugging or monitoring purposes, consider implementing log rotation to manage log file sizes automatically.
    • If the log file contains errors or warnings, address the underlying issues causing those errors to reduce future log growth.
    • If the log file doesn't seem to have any critical information and you have limited disk space, you might consider deleting the file.
    0
  • retechpro
    A 42GB MySQL log file (mysqld.log) is unusually large and might indicate an issue with your MySQL server's logging settings or database activity. Log files are used to record various events and activities in MySQL, and they can grow over time depending on the level of logging enabled and the amount of activity on the server.
    • If the log file contains valuable information for debugging or monitoring purposes, consider implementing log rotation to manage log file sizes automatically.
    • If the log file contains errors or warnings, address the underlying issues causing those errors to reduce future log growth.
    • If the log file doesn't seem to have any critical information and you have limited disk space, you might consider deleting the file.

    I"m not the expert. I don"t know it any important information is in log file. How can i check? If i delete, will i face any issue?
    0
  • kodeslogic
    Deleting the log file does not affect the service, but might make it difficult to diagnose issues in the future. Instead, you can truncate the log file to a smaller size using the below command. #truncate -s 50M /var/log/mysqld.log
    It will reduce the file size to the most recent 50 Megabytes of data (retains the newest data and removes all older data in the file above the 50M in size). So once you find the
    0
  • retechpro
    Deleting the log file does not affect the service, but might make it difficult to diagnose issues in the future. Instead, you can truncate the log file to a smaller size using the below command. #truncate -s 50M /var/log/mysqld.log
    It will reduce the file size to the most recent 50 Megabytes of data (retains the newest data and removes all older data in the file above the 50M in size). So once you find the
    0
  • kodeslogic
    I am glad I was able to help.
    0
  • cPRex Jurassic Moderator
    What do you see in /etc/my.cnf ?
    0

Please sign in to leave a comment.