MySQL log files can help you track warnings and errors as well as optimize slow queries.
To find the directories where MySQL keeps them, just type the SQL statement:
mysql -u root -p
mysql>SHOW VARIABLES LIKE '%log_file%';
This will show where your MySQL server keeps the log files.