เปิดใช้งาน log_slow_queries MySQL 5.7 บน Ubuntu

ตอบกระทู้

รูปแสดงอารมณ์
:icon_plusone: :like: :plusone: :gfb: :-D :) :( :-o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: :angry: :baa: :biggrin:
รูปแสดงอารมณ์อื่นๆ

BBCode เปิด
[img] เปิด
[url] เปิด
[Smile icon] เปิด

กระทู้แนะนำ
   

มุมมองที่ขยายได้ กระทู้แนะนำ: เปิดใช้งาน log_slow_queries MySQL 5.7 บน Ubuntu

เปิดใช้งาน log_slow_queries MySQL 5.7 บน Ubuntu

โดย mindphp » 31/12/2019 5:55 pm

สำหรับ MySQL 5.7
เปิดไฟล์ mysqld.cnf

โค้ด: เลือกทั้งหมด

nano /etc/mysql/mysql.conf.d/mysqld.cnf
แก้ไข

โค้ด: เลือกทั้งหมด

log_slow_queries=/var/log/mysql/mysql-slow.log
long_query_time = 2
log-queries-not-using-indexes

ข้างบน