2023-06-08 14:32:59.146871 root[root] @ localhost [::1] 5 1 Query (BLOB) 45 bytes 2023-06-08 14:32:59.150030 root[root] @ localhost [::1] 6 1 Init DB (BLOB) 5 bytes我general_log表是这样的
时间: 2024-04-06 13:33:10 浏览: 16
根据你提供的 general_log 表的样例,可以看到最近两条记录的 command_type 分别是 Query 和 Init DB,其中 Query 记录的 argument 字段包含了一段 BLOB 类型的二进制数据(45 bytes),而 Init DB 记录的 argument 字段则包含了一个长度为 5 的 BLOB 类型数据。因此,如果你最近执行的 SQL 语句没有被记录在 general_log 表中,可能是因为它不是一个 Query 或 Execute 类型的命令,或者是因为它没有执行成功。你可以尝试重新执行你的 SQL 语句,并检查一下 general_log 表中是否有新的记录被添加进去。
相关问题
time="2023-06-07T22:01:46+08:00" level=info msg="Starting mysqld_exporter (version=0.12.1, branch=HEAD, revision=48667bf7c3b438b5e93b259f3d17b70a7c9aff96)" source="mysqld_exporter.go:257" time="2023-06-07T22:01:46+08:00" level=info msg="Build context (go=go1.12.7, user=root@0b3e56a7bc0a, date=20190729-12:35:58)" source="mysqld_exporter.go:258" time="2023-06-07T22:01:46+08:00" level=info msg="Enabled scrapers:" source="mysqld_exporter.go:269" time="2023-06-07T22:01:46+08:00" level=info msg=" --collect.global_status" source="mysqld_exporter.go:273" time="2023-06-07T22:01:46+08:00" level=info msg=" --collect.global_variables" source="mysqld_exporter.go:273" time="2023-06-07T22:01:46+08:00" level=info msg=" --collect.slave_status" source="mysqld_exporter.go:273" time="2023-06-07T22:01:46+08:00" level=info msg=" --collect.info_schema.innodb_cmp" source="mysqld_exporter.go:273" time="2023-06-07T22:01:46+08:00" level=info msg=" --collect.info_schema.innodb_cmpmem" source="mysqld_exporter.go:273" time="2023-06-07T22:01:46+08:00" level=info msg=" --collect.info_schema.query_response_time" source="mysqld_exporter.go:273" time="2023-06-07T22:01:46+08:00" level=info msg="Listening on :9104" source="mysqld_exporter.go:283"
这是 mysqld_exporter 启动时的日志信息,其中包含了一些重要的信息:
1. mysqld_exporter 的版本、分支和代码版本号等信息。
2. 启用的采集器(scrapers)列表,包括 `global_status`、`global_variables`、`slave_status`、`info_schema.innodb_cmp`、`info_schema.innodb_cmpmem`、`info_schema.query_response_time` 等。
3. 监听的端口号,默认为 9104。
根据日志信息可以得知 mysqld_exporter 已经成功启动,并且正在监听端口号 9104,可以通过访问 `http://localhost:9104/metrics` 查看 MySQL 相关指标。
server: port: 8080 spring: datasource: username: root password: 123456 driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/db?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8 druid: initial-size: 5 min-idle: 5 max-active: 20 max-wait: 60000 time-between-eviction-runs-millis: 60000 min-evictable-idle-time-millis: 100000 max-evictable-idle-time-millis: 300000 validation-query: SELECT 1 FROM DUAL test-while-idle: true test-on-borrow: false test-on-return: false pool-prepared-statements: true aop-patterns: com.example.demo.* stat-view-servlet: enabled: true login-username: root login-password: 123456 web-stat-filter: enabled: true url-pattern: /* exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' filters: stat,wall filter: stat: slow-sql-millis: 1000 log-slow-sql: true enabled: true wall: enabled: true config: drop-table-allow: false重写yml格式
我可以帮你重新格式化这段YAML格式的文本,如下所示:
```yaml
server:
port: 8080
spring:
datasource:
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/db?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8
druid:
initial-size: 5
min-idle: 5
max-active: 20
max-wait: 60000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 100000
max-evictable-idle-time-millis: 300000
validation-query: SELECT 1 FROM DUAL
test-while-idle: true
test-on-borrow: false
test-on-return: false
pool-prepared-statements: true
aop-patterns: com.example.demo.*
stat-view-servlet:
enabled: true
login-username: root
login-password: 123456
web-stat-filter:
enabled: true
url-pattern: /*
exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*'
filters: stat,wall
filter:
stat:
slow-sql-millis: 1000
log-slow-sql: true
enabled: true
wall:
enabled: true
config:
drop-table-allow: false
```
希望这样的格式更易读和明了。如果你还有任何其他问题,请随时提问!
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)