Find the answer to your Linux question:
Results 1 to 4 of 4
I need to active the MySQL query log on: Server version: 5.0.45 Source distribution I tried editing /etc/my.cnf and mine now looks like: Code: [mysqld] set-variable=local-infile=0 datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock # Default ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Posts
    10

    How do I Active MySQL Query Log?


    I need to active the MySQL query log on:

    Server version: 5.0.45 Source distribution

    I tried editing

    /etc/my.cnf

    and mine now looks like:

    Code:
    [mysqld]
    set-variable=local-infile=0
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    # Default to using old password format for compatibility with mysql 3.x
    # clients (those using the mysqlclient10 compatibility package).
    old_passwords=1
    wait_timeout=1800
    max_connections=150
    connect_timeout=10
    
    [mysql.server]
    user=mysql
    basedir=/var/lib
    
    [mysqld_safe]
    log-error=/var/log/mysqld.log
    pid-file=/var/run/mysqld/mysqld.pid
    log=/var/log/mysqld.log
    log-output = FILE,TABLE
    and of course I ran:

    Code:
    service mysqld restart

    but when I view /var/log/mysqld.log I just see startup/shutdown things, but no queries. Can anyone point me in the right direction to get the query log turned on?

    Thanks!

  2. #2
    Just Joined!
    Join Date
    Jun 2008
    Posts
    1
    i'm guessing you already checked this, but nonetheless:

    MySQL :: MySQL 5.1 Reference Manual :: 5.2.3 The General Query Log


    Good Luck!

  3. #3
    Just Joined!
    Join Date
    Mar 2008
    Posts
    10
    Yes, I read that page several times. I now see the problem. I have version 5.0.45 but the general query log apparently only exists from MySQL 5.1.6.

    Thank you.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Mar 2008
    Posts
    10
    answer is it must be in the

    [mysqld]

    section not in the

    [mysqld_safe]

    section

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •