登录mysql终端 mysql -uroot -p 输入密码: 进入mysql>
1.日志文件路径
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)
2.错误日志文件路径
mysql> show variables like ‘log_error’;
±--------------±-----------------------------------+
| Variable_name | Value |
±--------------±-----------------------------------+
| log_error | /usr/local/mysql/data/localhost.err |
±--------------±-----------------------------------+
1 row in set (0.00 sec)
3.慢查询日志文件路径
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)
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/184373.html原文链接:https://javaforall.cn