Modifying the MY.CNF configuration file
/usr/local/mysql/bin/mysql--verbose--help | Grep-a 1 ' Default options '
Default options is read from the following files in the given order:
/ETC/MY.CNF/ETC/MYSQL/MY.CNF/USR/LOCAL/MYSQL/ETC/MY.CNF ~/.my.cnf
Modify/ETC/MY.CNF, find [mysqld], add below:
General_log_file = "E:/data/mysql.log" Slow_query_log = 1
When you're done, remember to restart the MySQL service!
Do not modify the configuration implementation by turning on the service-specific parameter implementation
[[email protected] ~]# ps-ef|grep MySQL
Kill-9 1613
Nohup/usr/local/mysql/bin/mysqld--basedir=/usr/local/mysql--datadir=/home/data/mysql--plugin-dir=/usr/local/ Mysql/lib/plugin--user=root--log-error=/home/data/mysql/localhost.localdomain.err
--general-log=1--general-log-file=/tmp/mysql.log--pid-file=/home/data/mysql/localhost.localdomain.pid--socket=/tmp/mysql.sock--port=3306 &
SQL statement executed by MySQL Trace