mysql 错 Could not open JDBC Connection for transaction; nested exception is java.sql.SQLExceptio

 

运行时报com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown character set: 'utf8mb4'导致

浏览器报Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connectio+

The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

真的只要换驱动就行

用的mysql6.0.5数据库,折磨两天的问题终于解决了,最后用5.1.6的驱动包解决

mysql 错 Could not open JDBC Connection for transaction; nested exception is java.sql.SQLExceptio_第1张图片

 

 

装别的版本 也能解决

上面的Mysql6.0被我砍了       数据库现在用 Mysql 5.7  或 8.0

项目的配置及maven依赖

jdbc.driverClassName=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://192.168.1.1:3306/testingdevice?useAffectedRows=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
jdbc.username=mysql8
jdbc.password=root

jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://192.168.1.1:3306/testingdevice?useAffectedRows=true&useSSL=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT
jdbc.username=mysql5.7
jdbc.password=root
# 想升级为mysql8,  5.1.46替换为8.0.11   


    mysql
    mysql-connector-java
    5.1.46




    org.mybatis.generator
    mybatis-generator-maven-plugin
    1.3.5
    
        
            mysql
            mysql-connector-java
            
            5.1.46
        
    


 

 

 

 

 

 

 

浏览器报The origin server did not find a current representation for the target resource o

可能是你连接有问题

http://localhost:8080/ssm_pro/help/访问不了

http://localhost:8080/help/却可以,少了

mysql 错 Could not open JDBC Connection for transaction; nested exception is java.sql.SQLExceptio_第2张图片

在Controller层  类前加上

@RequestMapping("/ssm_pro")     则该类所有链接前都要加上 ssm_pro才能访问

你可能感兴趣的:('utf8mb4',The,origin,server,did,not,find)