Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6061823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:58:53+00:00 2026-05-23T08:58:53+00:00

How do I enable the MySQL function that logs each SQL query statement received

  • 0

How do I enable the MySQL function that logs each SQL query statement received from clients and the time that query statement has submitted?
Can I do that in phpmyadmin or NaviCat?
How do I analyse the log?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:58:53+00:00Added an answer on May 23, 2026 at 8:58 am

    First, Remember that this logfile can grow very large on a busy server.

    For mysql < 5.1.29:

    To enable the query log, put this in /etc/my.cnf in the [mysqld] section

    log   = /path/to/query.log  #works for mysql < 5.1.29
    

    Also, to enable it from MySQL console

    SET general_log = 1;
    

    See http://dev.mysql.com/doc/refman/5.1/en/query-log.html

    For mysql 5.1.29+

    With mysql 5.1.29+ , the log option is deprecated. To specify the logfile and enable logging, use this in my.cnf in the [mysqld] section:

    general_log_file = /path/to/query.log
    general_log      = 1
    

    Alternately, to turn on logging from MySQL console (must also specify log file location somehow, or find the default location):

    SET global general_log = 1;
    

    Also note that there are additional options to log only slow queries, or those which do not use indexes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use a prepared statement that deletes from two (temporary) tables:
How do I enable external access to MySQL Server? I can connect locally but
I am trying to enable Full-text indexing in SQL Server 2005 Express. I am
I need to enable/disable completely network interfaces from a script in Windows XP. I'm
I have a JavaScript slideshow that pre-loads images out of a MySQL database and
How do I enable SSL on MySQL server in Windows? I have downloaded OpenSSL
I'm trying to optimize a SQL Server. I have some experience with Mysql and
I'm searching a software (web-based, php/mysql) that allows users to (anonymously/with registering) write suggestions
I've written a stored FUNCTION that calls itself, recursively. However when I run it
So I've been working on an application that has woeful access control up till

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.