Debian / Ubuntu MySQL Error Log File Location

by on March 18, 2009 · 2 comments· LAST UPDATED March 25, 2010

in

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.e
TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 2 comments… read them below or add one }

1 Estêvão Samuel Procópio June 25, 2011 at 4:30 pm

Try to take a look in /var/log/syslog for mysql errors…

Reply

2 Michael McDonald April 30, 2013 at 10:36 am

99.9% of users will find their mysql logs in /var/syslog

Especially if they installed apache2 and didn’t manually change the logging paths in the .ini file.

Reply

Leave a Comment

Tagged as: , , , , , , , , , , , , ,

Previous Faq:

Next Faq: