Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log Mysql warnings

Tags:

mysql

warnings

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.

like image 350
Marton Trencseni Avatar asked Aug 15 '26 20:08

Marton Trencseni


1 Answers

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=1
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"
like image 194
ChrisBD Avatar answered Aug 18 '26 15:08

ChrisBD



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!