How to check MySQL error logs?

To check MySQL error logs, you can typically find them in the following locations, depending on your system configuration:

  1. Default Location:

    • On many systems, the error log is located at:
      /var/log/mysql/error.log
    • You can view the log using:
      cat /var/log/mysql/error.log
    • Or to view it in real-time, use:
      tail -f /var/log/mysql/error.log
  2. Custom Location:

    • If you have a custom configuration, check the MySQL configuration file (my.cnf or my.ini) for the log_error directive, which specifies the path to the error log.
  3. Using MySQL Command:

    • You can also check the error log path by running the following command in the MySQL shell:
      SHOW VARIABLES LIKE 'log_error';

Let me know if you need more help!

0 Comments

no data
Be the first to share your comment!