• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Where do I find mysqld logs?

C

CloneCommander

Guest
Hi!

Could anyone tell me where i can find the logs of the MySQL Daemon?

I have SuSE Linux 9.2 with Plesk 7.5.4.

In the /etc.my.cnf is a log file configured, but it is empty...

Tibor
 
that was also my first idea - but there is no mysql log :(

the only mysqld.log I found is this:

/var/lib/mysql/mysqld.log

but it is emtpy...
 
Originally posted by CloneCommander
that was also my first idea - but there is no mysql log :(

the only mysqld.log I found is this:

/var/lib/mysql/mysqld.log

but it is emtpy...

What are you looking to find? /var/log/mysqld.log is a error log, if there are no errors then the file would be empty.
 
I have a website which loads ~ 5 sec, and during this time the mysqld has 99% cpu load

so I hope I could see what the site does during loading to fix it :)
 
Originally posted by CloneCommander
I have a website which loads ~ 5 sec, and during this time the mysqld has 99% cpu load

so I hope I could see what the site does during loading to fix it :)

You probably want to turn on the slow query log, then.

http://dev.mysql.com/doc/refman/4.1/en/slow-query-log.html

Basically you would edit /etc/my.cnf and in the [mysqld] section add a line:

log-slow-queries=/var/lib/mysql/slow.log
set-variable = long_query_time=3

This will log any queries taking longer than 3 seconds into the logfile specified. Odds are you have mysql out of the box and it is not tuned at all.

I found these sites to be decent references:

http://www.hackmysql.com/
http://jeremy.zawodny.com/mysql/
 
Back
Top