Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> MySQL

ตรวจสอบสถานะ MySQL Server ด้วย mysqladmin status

คำสั่งตรวจสอบสถานะ

C:\mysql\bin> mysqladmin -u root status

ตัวอย่างผลลัพธ์

Uptime: 3865
Threads: 1
Questions: 50
Slow queries: 0
Opens: 113
Flush tables: 1
Open tables: 102
Queries per second avg: 0.012

ความหมายของแต่ละฟิลด์

เวลาทำงาน (วินาที)
ฟิลด์ความหมาย
Uptime
Threadsจำนวนการเชื่อมต่อปัจจุบัน
Questionsจำนวนคำสั่งที่ประมวลผล
Slow queriesคำสั่งที่เกิน long_query_time
Opensจำนวนครั้งที่เปิดตาราง
Flush tablesจำนวนครั้ง flush table cache
Open tablesตารางที่เปิดอยู่
Queries per second avgค่าเฉลี่ย QPS

ประโยชน์

  • ตรวจสอบโหลดของเซิร์ฟเวอร์
  • ดู Slow queries ว่ามีหรือไม่
  • Monitor จำนวน Connection