数据库还原发现存在连接的会话,导致数据库还原卡死或失败;
登录mysql或者用navicat客户端连接数据库;
/usr/local/mysql/bin/mysql -h127.0.0.1 -P3306 -uroot -pMyy@95938
1、查询数据库的连接
select id, db, user, host, command, time, state, info from information_schema.processlist where db = 'erp_autocb' order by time desc;
2、杀掉连接
kill 连接id
再次查询发现没有了;