Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am using Mysql 5.6.12 under Wamp server environment. Now I want to log All queries into ".log" file, the queries which are running by PHP or from PHPMyAdmin, I want to log them...

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted
[mysqld]
# Set Slow Query Log
long_query_time = 1
slow_query_log = 1
slow_query_log_file = /usr/log/slowquery.log
log_queries_not_using_indexes = 1

#Set General Log
general_log = on
general_log_file=/usr/log/general.log

Note that enabling general_log on a production server has overhead you should avoid it. You can check problematic queries from slow log.

share|improve this answer
add comment

If you use these two lines in my.cnf, I find that it works fine. This will log all queries to the server, from any source, not just PHP/PHPMyAdmin. Paul...

[mysqld]

general_log     = on
general_log_file=/users/ugrad/linehanp/mydb/logfile.txt
share|improve this answer
    
Thanks Man.... It solve the problem. :) –  Qazi Mar 31 at 10:21
add comment

Your Answer

 
discard

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.