1

I have an error in my script and want to see full mysql query but mysql error log don't show any queryies that my script send. I changed my.ini file and add

general_log = 1
slow_query_log = 1
slow_query_log_file = "C:/xampp/mysql/data/mysql-slow.log"  

I found this in slow-query.log file

c:\xampp\mysql\bin\mysqld.exe, Version: 5.6.21-log (MySQL Community Server (GPL)). started with:
TCP Port: 3306, Named Pipe: C:/xampp/mysql/mysql.sock
Time                 Id Command    Argument

But how to see full query of my script? Thanx in advance!

  • There's not enough information here to answer this question. What database library are you using, MySQLI? PDO? How are you constructing the query, with string concatenation? With prepared statements? What is the query you're trying to run? Does the query work properly when you execute it directly on the SQL server? – GordonM Jan 12 '15 at 09:09
  • I hope this link will help you. http://dba.stackexchange.com/questions/62129/how-to-log-all-mysql-queries-into-log-file – Qazi Jan 12 '15 at 09:09
  • Refer these 2 links.Hope you'll get your answer. [1]: http://stackoverflow.com/questions/650238/how-to-show-the-last-queries-executed-on-mysql [2]: http://stackoverflow.com/questions/303994/log-all-queries-in-mysql – adarsh hota Jan 12 '15 at 09:09
  • http://stackoverflow.com/q/6479107/1179841 – Sithu Jan 12 '15 at 09:12
  • http://stackoverflow.com/q/303994/1179841 – Sithu Jan 12 '15 at 09:15

1 Answers1

0

To see all queries, not only the slow ones, you have to specify also general_log_file:

general_log=1
general_log_file="C:/xampp/mysql/data/query.log"

And then restart mysql server.

Marek
  • 7,337
  • 1
  • 22
  • 33