如何查看mysql日誌文件位置
阿新 • • 發佈:2018-01-15
sql slow name 慢查詢日誌 query log -s span sim 登錄mysql終端
日誌文件路徑
mysql> show variables like 'general_log_file';
+------------------+------------------------------------+
| Variable_name | Value |
+------------------+------------------------------------+
| general_log_file | /usr/local/mysql/data/localhost.log |
+------------------+------------------------------------+
1 row in set (0.00 sec)
錯誤日誌文件路徑
mysql> show variables like 'log_error';
+---------------+------------------------------------+
| Variable_name | Value |
+---------------+------------------------------------+
| log_error | /usr/local/mysql/data/localhost.err |
+---------------+------------------------------------+
1 row in set (0.00 sec)
慢查詢日誌文件路徑
mysql> show variables like 'slow_query_log_file';
+---------------------+-----------------------------------------+
| Variable_name | Value |
+---------------------+-----------------------------------------+
| slow_query_log_file | /usr/local/mysql/data/localhost-slow.log |
+---------------------+-----------------------------------------+
1 row in set (0.01 sec)
日誌文件路徑
mysql> show variables like 'general_log_file';
+------------------+------------------------------------+
| Variable_name | Value |
+------------------+------------------------------------+
| general_log_file | /usr/local/mysql/data/localhost.log |
+------------------+------------------------------------+
錯誤日誌文件路徑
mysql> show variables like 'log_error';
+---------------+------------------------------------+
| Variable_name | Value |
+---------------+------------------------------------+
| log_error | /usr/local/mysql/data/localhost.err |
+---------------+------------------------------------+
慢查詢日誌文件路徑
mysql> show variables like 'slow_query_log_file';
+---------------------+-----------------------------------------+
| Variable_name | Value |
+---------------------+-----------------------------------------+
| slow_query_log_file | /usr/local/mysql/data/localhost-slow.log |
1 row in set (0.01 sec)
如何查看mysql日誌文件位置