美文网首页
使用mysql-connector-java-6.0.6.jar

使用mysql-connector-java-6.0.6.jar

作者: hui2743 | 来源:发表于2017-10-10 22:02 被阅读0次

    异常:

    spring

    org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
    

    servlet

    java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException
    

    解决:

    jdbcUrl=jdbc:mysql://localhost:3306/db
    

    改为:

    jdbcUrl=jdbc:mysql://localhost:3306/db?serverTimezone=UTC
    

    相关文章

      网友评论

          本文标题:使用mysql-connector-java-6.0.6.jar

          本文链接:https://www.haomeiwen.com/subject/zfnbyxtx.html