The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL General Query Log

Discussion in 'General Discussion' started by GeekPatrolMille, Jul 22, 2004.

  1. GeekPatrolMille

    GeekPatrolMille Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    McKinney, Texas, USA
    I am needing to assist in debugging some application stuff with a client and they have asked to have the General Query Log turned on so they can view their SQL querys. I know what this is and I have done it in the past but I can not seem to figure out how to enable it under cPanel implementation.

    Beyond the obligatory hour or so of digging and reading, I have tried one thing which should have worked. I added a line to the /etc/my.conf that reads log=/var/log/mysqld.log and restarted mySQL. No log file was created...

    Before I go modifying many of the other files, I wish to pose these questions... which file do I add the log directive to to activate the logging and once activated, can it be limited to logging only query activity for the specific domain or database they wish to monitor?

    Thanks in advance for your answers :confused:
    -greg
     
  2. thenetbox

    thenetbox Member

    Joined:
    Jul 5, 2003
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    I don't know how to log just one domains logs..

    You should however touch /path/to/mysqllog.log
    and then chown mysql.root /path/to/mysqllog.log

    and then restart mysql

    that should start logging of every mysql query
     
  3. GeekPatrolMille

    GeekPatrolMille Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    McKinney, Texas, USA
    You hit the nail squarely on the head... I found information about a week after posting which gave me pretty much the same instructions. I have been logging ever since. Thanks for your response....

    -greg
     
Loading...

Share This Page