Debian / Ubuntu MySQL Error Log File Location

Posted on in Categories , last updated March 25, 2010

Can you tell me the location of for the MySQL error log file under Debian or Ubuntu Linux? How do I view error log file?

The data directory is also the default location for other information such as log files and status files. However, under Debian and Ubuntu Linux the MySQL error log file location is as follows:

  • /var/log/mysql.err – MySQL Error log file
  • /var/log/mysql.log – MySQL log file

You can use the commands as follows:

grep 'something' /var/log/mysql.err
tail -f  /var/log/mysql.err 
less /var/log/mysql.err

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

2 comment

Leave a Comment