1 om.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown character set: 'utf8mb4'
2 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
3 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
4 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
5 at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
6 at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
7 at com.mysql.jdbc.Util.getInstance(Util.java:386)
8 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
9 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)
10 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)
11 at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)
12 at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
13 at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2618)
14 at com.mysql.jdbc.ConnectionImpl.configureClientCharacterSet(ConnectionImpl.java:1880)
15 at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3499)
16 at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2384)
17 at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2153)
18 at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
问题描述:报Unknown character set: 'utf8mb4'异常,自己一开始也查找了许多资料,以为mysql6.0版本不支持,后来发现不是mysql数据库引起的问题,而是mysql驱动引起的问题,
解决办法:将mysql驱动改成 mysql-connector-java-5.1.6-bin.jar 版本,问题解决,高版本也不行,本人已试,希望给各位带来帮助。