1.查询正在commit的事务

查询 正在执行的事务:
SELECT * FROM information_schema.INNODB_TRX

查看正在锁的事务
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS; 

查看等待锁的事务
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS;

2.com.mysql.cj.core.exceptions.InvalidConnectionAttributeException: The server time zone value ‘�й���׼

jdbc 6.0 for java 6.0及以上,都需要设置serverTimezone,否则会报错

示例

spring.datasource.url=
jdbc:mysql://localhost:3306/springboot?&serverTimezone=Asia/Shanghai&charset=utf8mb4&useSSL=false

3.mysql批量加载大数据表

bin/mysqld --user=mysql --datadir=/mysql_data --secure_file_priv=/data 
指定安全路径

加载SQL

 LOAD DATA INFILE "/data/path" into table table_name fields terminated by ',' lines terminated by '\n' ignore 1 lines (字段列表)