Question : Mysql error log on linux machine

Hello,

I`ve tried to enable mysql query log on a Linux machine. I edited the my.cnf file:
[mysqld]
...
log=/var/log/mysqld/mysqld.log
...

I saved the file and restarted the mysql service
service mysqld restart

... but there is no flog files ???

Answer : Mysql error log on linux machine

i think it should be

log=mysqld.log

so it will create log file in /var/lib/mysql direcotry (redhat, centos)

how ever
make sure you gave permission mysql to write in /var/log/mysqld/mysqld.log direcotyr

go to
cd /var/log
ls -l

see mysqld direcotry is writtiable via mysql

chown -R mysql:mysql mysqld
Random Solutions  
 
programming4us programming4us