欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

windows 请问MYSQL日志文件默认存放在哪里,位置, 有大用 有大大用

你指的是二进制日志么?

修改/etc/my.cnf文件中的log-bin条目,如下所示
log-bin=/backup/mysqlbinlog/mysql-bin

重启mysql后,会在目录/backup/mysqlbinlog/中生成mysql-bin0000xx日志文件

来自  https://bbs.csdn.net/wap/topics/280042551



mysql日志文件在哪

最佳答案

登录mysql终端
日志文件路径
mysql> SHOW  VARIABLES  LIKE  '%log%'   //应该总能看到吧


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)


来自  https://zhidao.baidu.com/question/262398395233798445.html

普通分类: