Release Notes
Announcements
mysql> show variables like 'slow%';+---------------------+----------------------------------------+| Variable_name | Value |+---------------------+----------------------------------------+| slow_launch_time | 2 || slow_query_log | ON || slow_query_log_file | /data/mysql/VM_83_217_centos-slow.log |+---------------------+----------------------------------------+
slow_query_log is ON, it indicates that it is enabled; if it is OFF, enable slow log recording by executing the following command:mysql> set global slow_query_log='ON';
/etc/my.cnf) and add the following under mysqld:root@xxx ~ # vim /etc/my.cnf[mysqld]slow_query_log=ON
show variables like 'slow%' command on the database instance to check the location of the slow log file:mysql> show variables like 'slow%';+----------------------+----------------------------------------+| Variable_name | Value |+----------------------+----------------------------------------+| slow_launch_time | 2 || slow_query_log | ON || slow_query_log_file | /data/mysql/VM_83_217_centos-slow.log |+----------------------+----------------------------------------+
slow_query_log_file is the location of the slow log file. Modify its parent directory permissions to be accessible and set the log file to readable:root@xxx ~ # chmod 755 /dataFor the above slow log file, its parent directories are /data/mysql and /data. Configure permissions for each directory.root@xxx ~ # chmod 755 /data/mysqlThen set the log file to readable.root@xxx ~ # chmod 644 /data/mysql/VM_83_217_centos-slow.log

Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan