#查詢慢查詢日誌文件路徑show variables like '%slow_query%';#開啓慢查詢日誌 set global slow_query_log=1; #設置慢查詢閥值爲0,將全部的語句都記入慢查詢日誌 set global long_query_time=0;#未使用索引的查詢也被記錄到慢查詢日誌中set global log-queries-not-using-indexes=1;