项目中在使用线程跑定时任务时,遇到报错,"Could not open JPA EntityManager for transaction Caused by: org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection",报错信息看是数据库连接无法获取问题,但是在开发调试的过程中,并没有这个错误,只有在部署到机器,运行定时任务时,会抛出这样的异常: 自己定位无果后,求助于同组大哥,大哥
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'解决?: >>> vim /etc/my.cnf >>> [client] default-character-set=utf8 socket=/storage/db/mysql/mysql.sock [mysql] default-character-set=utf8 socket=/storage/db/mysq