MySQL log files believe that we all have a lot of understanding, MySQL log files in general:/var/log/mysqld.log, the following teach you to modify the MySQL log file location method for your reference.
Today need to change the location of the MySQL log file, found in the/etc/my.cnf can not be changed.
The MySQL log bit was later found to be specified:
[Root@localhost etc]# PS aux|grep mysqld
Root 11830 0.5 0.0 4524 1204 pts/0 S-03:03 0:00/bin/sh/usr/bin/mysqld_safe--datadir=/data/mysql--socket=/var/lib/mysql /mysql.sock--log-error=/var/log/mysqld.log--pid-file=/var/run/mysqld/mysqld.pid
MySQL 11890 3.7 0.1 40456 9076 pts/0 Sl 03:03 0:00/usr/libexec/mysqld--basedir=/usr--datadir=/data/mysql--user=mysql- -pid-file=/var/run/mysqld/mysqld.pid--skip-external-locking--port=3306--socket=/var/lib/mysql/mysql.sock
Root 11909 0.0 0.0 3908 664 pts/0 s+ 03:03 0:00 grep mysqld
Chkconfig--list Discovery is chkconfig on specified, day is
Vim/etc/init.d/mysqld learned that this place has been configured
Get_mysql_option mysqld datadir "/var/lib/mysql"
Datadir= "$result"
Get_mysql_option mysqld Socket "$datadir/mysql.sock"
Socketfile= "$result"
Get_mysql_option mysqld_safe log-error "/var/log/mysqld.log"
Errlogfile= "$result"
Get_mysql_option mysqld_safe pid-file "/var/run/mysqld/mysqld.pid"
Mypidfile= "$result"
It should be okay to change this.