有时候我们在执行一条SQL语句时,或者更改表结构时,由于这张表的数据量巨大,往往会在执行操作后就会卡住…然后这张表就会被锁住..这时,我们可以杀掉这个进程.
这里有两种方法查看和杀掉进程;
SHOW PROCESSLIST;
-- 然后找到对应的ID:
KILL 41515;
"nested exception is org.apache.ibatis.exceptions.PersistenceException: \n### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 15000, active 0, maxActive 20, creating 0, createErrorCount 4\n### The error may exist in URL [jar:file:/application/app.jar!/BOOT-INF/classes!/mapper/mysql/xxxMapper.xml]\n### The error may involve com.baiwang.test.basic.test.mapper.xxxMapper.queryByCondition\n### The error occurred while executing a query\n### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 15000, active 0, maxActive 20, creating 0, createErrorCount 4"