hibernate definitely connects mysql using a connection pool, you might want to check the config file there make sure you have sufficient spare connections available.I am not familiar with hibernate, check if you have to explicitly close/release connection in your java codes...
---------------------------------------------------------------------------------------------------- show processlists; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'processlists' at line 1 请问这是啥原因?
---------------------------------------------------------------------------------------------------- show processlists; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'processlists' at line 1 请问这是啥原因?你的sql写错了,应该是SHOW FULL PROCESSLIST; 或者 SHOW PROCESSLIST; 没有's'
2、每次刷新是否以释放原连接
确实是代码没有释放连接,代码中查询获取session试过了这几种方法,encodingRulesDao.getHibernateSession().createSQLQuery(sql.toString()),getHibernateTemplate().getSessionFactory().openSession(),
getHibernateTemplate().getSessionFactory().getCurrentSession(),发现连接都是只增不减。不知是不是哪里没配置对。上网看到说到spring事务管理,会自动管理session的释放,但是貌似没起到效果。
show processlists;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'processlists' at line 1
请问这是啥原因?
show processlists;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'processlists' at line 1
请问这是啥原因?你的sql写错了,应该是SHOW FULL PROCESSLIST; 或者 SHOW PROCESSLIST; 没有's'