I'm trying to get Mysql to log all warnings to the log file. I'm running stored procedures, and I want to get at the warnings they generate.
+1
A:
Assuming that you have administrator privilege then you need to change the server configuration. You can do this by using the MySQL server tools (workbench is the latest) or by editing the my.ini file directly.
remember to turn on general logging. Here's an entry for writing Errors to a logfile:
general-log
log-error = "C:\Program Files\MySQL\MySQL Server 5.1\logfiles\ErrorMessages.log"
edit
Ah. Here's an extract from my 5.0.51b server my.ini file
log-queries-not-using-indexes
log-warnings
long_query_time = 2
log = "C:\Program Files\MySQL\MySQL Server 5.0\logfiles\querylog.log"
log-slow-queries = "C:\Program Files\MySQL\MySQL Server 5.0\logfiles\SlowQueryLog.log"
log-error = "C:\Program Files\MySQL\MySQL Server 5.0\logfiles\ErrorLog.log"
ChrisBD
2010-05-06 15:57:07
There's no such setting as "general-log". After I put it in my.cnf Mysql does not start.
mtrencseni
2010-05-07 08:18:03
Ah, it's supposed to be "general-log = 1" and it's a 5.1.12+ feature. Unfortunately I'm on 5.0.x so I can't test it.
mtrencseni
2010-05-07 08:29:06
I posted an update to show some lines from a 5.0.51b my.ini file.
ChrisBD
2010-05-07 10:42:53