首先找到mysql 安装路径 例如我的C:\Program Files\MySQL\MySQL Server 5.7\bin
打开cmd 命令行 切换到安装路径下,
登录mysqlmysql -u root -p
SHOW GLOBAL VARIABLES LIKE \'%log%\';
日志文件路径mysql> show variables like \'general_log_file\';
错误日志文件路径mysql> show variables like \'log_error\';
慢查询日志文件路径mysql> show variables like \'slow_query_log_file\';