我的下载的是mysql-5.7.9绿色版出的问题。最终解决过程供你参考:
1、下载的mysql-5.7.9,出现你的问题。试了各种办法无法解决。有网友说mysql-5.7.9版本有问题。我改下载了5.6.27版本,尝试不成功。但报错变为:无法启动mysql服务,发生错误1067。解决办法:my.ini 添加 tmpdir = D:\mysql-5.6.27-winx64\data。问题解决。
2、后来我对比了mysql-5.7.9与5.6.27,发现mysql-5.7.9-winx64没有data目录,mysql-5.6.27-winx64\data\mysql,存了不少数据文件。原来调试5.7.9的版本时,记得日志报告一直有mysql.user、mysql.plugin不存在的提示。(原以为这些文件会自动生成)。后来把这个mysql-5.6.27-winx64\data下的mysql文件夹整个复制到5.7.9版本中的同目录下。问题解决。
5月 25, 2020 9:29:14 上午 com.mchange.v2.resourcepool.BasicResourcePool AcquireTask@359868cd -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:java.sql.SQLException: Unknown system variable 'tx_isolation'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1383)
at com.mysql.jdbc.ConnectionImpl.getTransactionIsolation(ConnectionImpl.java:3117)
at com.mchange.v2.c3p0.impl.NewPooledConnection.<init>(NewPooledConnection.java:107)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:198)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
原因:mysql-connector-java的版本太低,之前使用的是5.1.6,报该错误,修改为:8.0.13之后不报错
注意:idea中External Libraries需要将原来版本的mysql-connector-java删除
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)