Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ubuntu 10.04

I have set MySQL to log slow queries and a general mysql log. How can I pipe those files in syslog to forward to centralized logging service (which is working)? Tried:

source s_mysql_instance_1 {
    pipe("/var/log/mysql/mysql.log" );
log { 
     source(s_mysql_instance_1); destination(d_loggly); 


Error opening file for reading; filename='/var/log/mysql/mysql.log', error='Permission denied (13)'
Error initializing source driver; source='s_mysql_instance_1', id='s_mysql_instance_1#0'
Error initializing message pipeline;

I have also disabled apparmor and still get the same results

share|improve this question

Either the '/var/log/mysql/mysql.log' file doesn't exist (the default on my 12.04 machine is just /var/log/mysql.log), or the user that's performing this operation doesn't have access to it and needs to be granted read permission.

share|improve this answer
Ewan, The file does exist. So I thought it was a permissions but syslog-ng runs as root so there shouldn't be any permission problems right? Any other ideas? – Mbeale Jun 10 '12 at 20:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.