为了账号安全,请及时绑定邮箱和手机立即绑定

求助,这里run,访问/页面后就报错,可能跟druid有关,求助~

2018-12-21 16:46:38.732  INFO 26450 --- [reate-876802782] com.alibaba.druid.pool.DruidDataSource   : put physical connection to pool failed.

2018-12-21 16:46:38.736  INFO 26450 --- [       Thread-3] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'

2018-12-21 16:46:38.737 ERROR 26450 --- [reate-876802782] com.alibaba.druid.pool.DruidDataSource   : create connection holder error


java.sql.SQLException: Could not retrieve transation read-only status server

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1084) ~[mysql-connector-java-5.1.30.jar:na]

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987) ~[mysql-connector-java-5.1.30.jar:na]

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:973) ~[mysql-connector-java-5.1.30.jar:na]

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:918) ~[mysql-connector-java-5.1.30.jar:na]

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:949) ~[mysql-connector-java-5.1.30.jar:na]

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:939) ~[mysql-connector-java-5.1.30.jar:na]

at com.mysql.jdbc.ConnectionImpl.isReadOnly(ConnectionImpl.java:3976) ~[mysql-connector-java-5.1.30.jar:na]

at com.mysql.jdbc.ConnectionImpl.isReadOnly(ConnectionImpl.java:3947) ~[mysql-connector-java-5.1.30.jar:na]

at com.alibaba.druid.pool.DruidConnectionHolder.<init>(DruidConnectionHolder.java:143) ~[druid-1.1.3.jar:1.1.3]

at com.alibaba.druid.pool.DruidConnectionHolder.<init>(DruidConnectionHolder.java:84) ~[druid-1.1.3.jar:1.1.3]

at com.alibaba.druid.pool.DruidDataSource.put(DruidDataSource.java:2024) ~[druid-1.1.3.jar:1.1.3]

at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2282) [druid-1.1.3.jar:1.1.3]

Caused by: java.sql.SQLException: Unknown system variable 'tx_read_only'

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1084) ~[mysql-connector-java-5.1.30.jar:na]

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232) ~[mysql-connector-java-5.1.30.jar:na]

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164) ~[mysql-connector-java-5.1.30.jar:na]

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615) ~[mysql-connector-java-5.1.30.jar:na]

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776) ~[mysql-connector-java-5.1.30.jar:na]

at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2832) ~[mysql-connector-java-5.1.30.jar:na]

at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2781) ~[mysql-connector-java-5.1.30.jar:na]

at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1569) ~[mysql-connector-java-5.1.30.jar:na]

at com.mysql.jdbc.ConnectionImpl.isReadOnly(ConnectionImpl.java:3970) ~[mysql-connector-java-5.1.30.jar:na]

... 5 common frames omitted



配置文件也照着老师的写的

https://img1.sycdn.imooc.com//5c1ca9500001d86813740508.jpg

正在回答

1 回答

你电脑上装的mysql server的版本要和maven内引入的version大版本号一致,视频里用的是mysql 5.几的client和server,检查下是否不一致

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
SpringBoot构建电商基础秒杀项目
  • 参与学习       49064    人
  • 解答问题       954    个

应用SpringBoot快速搭建拥有用户、商品、交易及秒杀活动的电商秒杀应用。

进入课程

求助,这里run,访问/页面后就报错,可能跟druid有关,求助~

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信