sah18
asked on
MySQL for windows - how to turn on logging to a file??
I have MySQL installed on a windows 2003 server. I have not used MySQL before, and do not know how to turn on logging to a file. If I remote in the the server it is installed on, and launch the MySQL Administrator, I do see a section for server logs. When I enter that section, the right side of the screen is all grayed out. I'm confused how to proceed. I want to view (or turn on) any errors that are occurring to troubleshoot an application problem we are having.
Thanks.
Thanks.
You could also start the MySQL server with
mysqld --log=drive:\path\to\file
to enable the query logging.
More here:
http://dev.mysql.com/doc/refman/5.0/en/query-log.html
Cheers,
za-k/
ASKER
I want to turn on logging of errors. I'm not sure I follow you odbc listing. I'm directly on the server that MySQL is running on, in the MySQL Administrator software. To be clearer, I've attached a screenshot of the Server Logging section of the MySQL Administrator that I'm referencing in my question. See how all the options are grayed out? How to I enable logging of errors to help troubleshoot an issue we are having?? I just don't see how to turn on error logging.
Thanks again.
ScreenShot001.bmp
Thanks again.
ScreenShot001.bmp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ok, you need to run your server with --log:
http://dev.mysql.com/doc/refman/5.0/en/query-log.html
Open Services on your computer, stop the MySQL server, then run mysqld from the command
line:
mysqld.exe --defaults-file="c:\\bin\\
Then look into
drive:\path\to\mysql\data
for a file ComputerName.log
In there you will find all the queries send to the server.
More here:
http://dev.mysql.com/doc/refman/5.0/en/query-log.html
Cheers,
za-k/
ASKER
Thank you for your help!
If you are connected to MySQL via ODBC, then you can enable ODBC logging:
Control Panel->Administrative Tools->Data Sources->Tracing.
Cheers,
za-k/