Hi Tom -

In your my.cnf file, you need to specify that the setting you put in is for mysqld, the server process. Your file should look like so:


[mysqld]
log = /var/log/mysqld.log


MySQL generally logs high-level info to files in the data directory: look for a file called <hostname>.err

Question: are you sure you want to log *everything* ? MySQL does have a general log feature, but bear in mind that it is a log of every query (insert update select delete etc) that happens, including any inserted data, so it can become very large very quickly. I had this happen on a production server, and it wasn't really that fun. See http://dev.mysql.com/doc/refman/5.0/en/query-log.html for more info

MySQL also offers a slow query log, which can be helpful in starting a performance/optimization process. To enable, put this in your my.cnf file under the [mysqld] section:
log-slow-queries=/path/to/logfile
See http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html

HTH,
Dan


Tom Ray [Lists] wrote:
Hey there, I inherited a couple of servers that are in production but I noticed that there's not active logging for mysql on any of them. I looked and they don't have an active my.cnf file any where on the machines. One machine is running mysql 4.1.5 and the other is running mysql 5.0.18

When I ran a ps -ef on the machines I saw this for both /usr/local/mysql/bin/mysqld ----defaults-extra-file=/usr/local/mysql/data/my.cnf so I went and I put a my.cnf right where it was looking for it. Stopped/Started the mysql server and I'm still not seeing any logging happening for the mysql servers. Perhaps I'm messing this up? I want them to log everything to /var/log/mysqld.log and in the my.cnf I have the line:

log = /var/log/mysqld.log

Can anyone tell me where I'm messing this up or what is wrong?


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to