/build/static/layout/Breadcrumb_cap_w.png

MySQL and Apache Profile Log Paths for Linux

MySQL Log Paths

    MySQL Server provides a number of logs which makes it easy to effectively track what activity is occurring. The three main types of MySQL logs are the general query log, the slow query log, and the error log. The general query log gives information on client connections and SQL statements received from clients. The slow query log displays queries which take longer than the long query time to execute. The error logs pinpoints problems when starting, running, or stopping MySQL Server. All MySQL logs can be monitored by the K1000 Monitoring component but the error logs are the most useful at troubleshooting MySQL problems. Depending on the Linux version, the error logs are stored in either error.log or the mysqld.log file. The Log Level in these files range from Critical, which is the most severe, then Error, then Warning which is the least crucial. The table below helps identify the error log path on different Linux Operating Systems.


Linux Operating Systems
MySQL LogsMySql Versions

Ubuntu Server 10.10

 /var/log/mysql/error.log
/var/log/mysql/mysql.log
 /var/log/mysql/mysql-slow.log
MySQL 5.1.49-1
Ubuntu Server 12.04
/var/log/mysql/error.log
/var/log/mysql/mysql.log
 /var/log/mysql/mysql-slow.log
MySQL 5.1.58-1
Ubuntu Server 14.04
/var/log/mysql/error.log
/var/log/mysql/mysql.log
 /var/log/mysql/mysql-slow.log
MySQL 5.0.22-2.1
Red Hat Enterprise Linux 5.x
/var/log/mysqld.log
MySQL 5.0.22-2.1
Red Hat Enterprise Linux 6.x
/var/log/mysqld.log
MySQL 5.1.52
Red Hat Enterprise Linux 7.x
/var/log/mysqld.log
MySQL 5.6.22
CentOS 4
/var/log/mysqld.log
MySQL 5.0.77-4
CentOS 5
/var/log/mysqld.log
MySQL 5.0.77-4
CentOS 6
/var/log/mysqld.log
MySQL 5.1.66-2
CentOS 7
/var/log/mysqld.log
MySQL 5.6.22
Fedora 16
/var/log/mysqld.log
MySQL 5.5.28
Fedora 17
/var/log/mysqld.log
MySQL 5.5.28
Fedora 18
/var/log/mysqld.log
MySQL 5.6.22
Fedora 19
/var/log/mysqld.log
MySQL 5.6.22
Fedora 20
/var/log/mysqld.log
MySQL 5.6.22
Debian 5
/var/log/mysqld.log
MySQL 5.5.28
Debian 6
/var/log/mysqld.log
MySQL 5.6.22
Debian 7
/var/log/mysqld.log
MySQL 5.6.22
OEL 4
/var/log/mysqld.log
MySQL 5.1.47-4
OEL 5
/var/log/mysqld.log
MySQL 5.1.47-4
OEL 6
/var/log/mysqld.log
MySQL 5.1.47-4
OEL 7
/var/log/mysqld.log
MySQL 5.6.22
openSUSE 10
/var/lib/mysql/mysqld.log
MySQL 5.0.45-22
openSUSE 11
/var/log/mysql/mysqld.log
MySQL 5.1.46-2.18
openSUSE 12
/var/log/mysql/mysqld.log
MySQL 5.5.16-3.3.1
openSUSE 13
/var/log/mysql/mysqld.log
MySQL 5.5.16-3.3.1
SUSE Linux Enterprise 11
/var/lib/mysql/mysqld.log
MySQL 5.6.22

                                                                            

 Apache Log Paths

    When managing a web server it is essential to get as much feedback as possible about its activity and performance as well as any problems encountered by the system. To do this, Apache has very comprehensive and versatile logging functionality. Apache records information about all visitors to your site, as well as any problems that may be occurring. This is done through the use of two types of log files: access log and the error log. The error log is the most important log file. All diagnostic information and errors obtained from serving requests are logged to the error log file. The log level of the error log shows the severity of messages received. The different levels are: emerg, alert, crit, error,warn, notice, info, and debug.  Apache uses the access log files to record all requests processed by the server. So information about which web browsers were employed by users and details pertaining to requests made to your site are all recorded by the access logs. K1000 supports many Linux distributions, so different Linux flavors may use different Apache directories for logging. Below is a list of Linux Operating systems and the log path used by Apache.


Linux Operating Systems
Apache Logs
Apache Versions
Ubuntu Server 10.10
/var/log/apache2/error.log
/var/log/apache2/access.log
Apache HTTPD 2.2.16-1
Apache Tomcat 6.0.28-2
Ubuntu Server 12.04
/var/log/apache2/error.log
/var/log/apache2/access.log
Apache HTTPD 2.2.22-1
Apache Tomcat 6.0.35-1
Ubuntu Server 14.04
/var/log/apache2/error.log
/var/log/apache2/access.log
Apache HTTPD 2.4.7-1ubuntu4
Apache Tomcat 8.0.5
Red Hat Enterprise Linux 5.x
/var/log/httpd/error_log
/var/log/httpd/access_log
Apache Tomcat 6.0.30
Apache HTTPD 2.2.3-6
Red Hat Enterprise Linux 6.x
/var/log/httpd/error_log
/var/log/httpd/access_log
Apache HTTPD 2.2
Red Hat Enterprise Linux 7.x
/var/log/httpd/error_log
/var/log/httpd/access_log
Apache HTTPD 2.4.6-17.el7.x86_64
Apache Tomcat 8.0.8
CentOS 4
/var/log/httpd/error_log
/var/log/httpd/access_log
Apache HTTPD 2.0.52-41
Apache Tomcat 6.0.30
CentOS 5
/var/log/httpd/error_log
/var/log/httpd/access_log
Apache HTTPD 2.2.3-43
Apache Tomcat 5.5.32
CentOS 6
/var/log/httpd/error_log
/var/log/httpd/access_log
Apache HTTPD 2.2.15-26
Apache Tomcat 7.0.41
CentOS 7
/var/log/httpd/error_log
/var/log/httpd/access_log
Apache HTTPD 2.4.6-17.el7.centos.1.x86_64
Apache Tomcat 8.0.9
Fedora 17
/var/log/httpd/error_log
/var/log/httpd/access_log
Apache HTTPD 2.2.22-4.fc17
Apache Tomcat 7.0.29
Fedora 18
/var/log/httpd/error_log
/var/log/httpd/access_log
Apache HTTPD 2.4.3-12.fc18
Apache Tomcat 7.0.35
Fedora 19
/var/log/httpd/error_log
/var/log/httpd/access_log
Apache HTTPD 2.4.6-2.fc19
Apache Tomcat 7.0.42
Fedora 20
/var/log/httpd/error_log
/var/log/httpd/access_log
Apache HTTPD 2.4.6-2.fc19
Apache Tomcat 7.0.42
Debian 5
/var/log/apache2/error.log
/var/log/apache2/access.log
Apache HTTPD 2.2.9-10
Debian 6
/var/log/apache2/error.log
/var/log/apache2/access.log
Apache HTTPD 2.2.16-6
Debian 7
/var/log/apache2/error.log
/var/log/apache2/access.log
Apache HTTPD 2.2.22-13
OEL 4
/var/log/httpd/error_log
/var/log/httpd/access_log
Apache HTTPD 2.0.52-41
Apache Tomcat 5.5.32
OEL 5
/var/log/httpd/error_log
/var/log/httpd/access_log
Apache HTTPD 2.2.3-45.0.1
Apache Tomcat 6.0.18
OEL 6
/var/log/httpd/error_log
/var/log/httpd/access_log
Apache HTTPD 2.2.15-5.0.1
Apache Tomcat 7.0.6
OEL 7
/var/log/httpd/error_log
/var/log/httpd/access_log
Apache HTTPD 2.2.15-9.0.1
Apache Tomcat 7.0.21
openSUSE 10
/var/log/apache2/error.log
/var/log/apache2/access.log
Apache HTTPD 2.2.4-70
Apache Tomcat 5.5.23-112
openSUSE 11
/var/log/apache2/error.log
/var/log/apache2/access.log
Apache HTTPD 2.2.15-3.7
openSUSE 12
/var/log/apache2/error.log
/var/log/apache2/access.log
Apache HTTPD 2.2.21-3.2.2
Apache Tomcat 7.0.21
openSUSE 13
/var/log/apache2/error.log
/var/log/apache2/access.log
Apache HTTPD 2.4.6-6.3.1.x86_64
Apache Tomcat 8.0.9
SUSE Linux Enterprise 11
/var/log/apache2/error.log
/var/log/apache2/access.log
Apache HTTPD 2.2.12-1.38.2
Apache Tomcat 7.0.47


Comments

  • bro thanksfor sharing this. - jonsnow 7 years ago
This post is locked

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ