zoukankan      html  css  js  c++  java
  • The last packet successfully received from the server was 2,272 milliseconds ago. The last packet sent successfully to the server was 2,258 milliseconds ago.

    报错

    org.apache.ibatis.exceptions.PersistenceException: 
    ### Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    
    The last packet successfully received from the server was 2,272 milliseconds ago.  The last packet sent successfully to the server was 2,258 milliseconds ago.
    ### The error may exist in pers/gs/dao/UserMapper.xml
    ### The error may involve pers.gs.dao.UserDao.getUserList
    ### The error occurred while executing a query
    ### Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    
    The last packet successfully received from the server was 2,272 milliseconds ago.  The last packet sent successfully to the server was 2,258 milliseconds ago.
    

    原因

    在网上查询许多,没有解决问题,最后考虑到我的数据库连接字符串

    jdbc:mysql://localhost:3306/mybatis?useSSL=true&userUnicode=true&characterEncoding=UTF-8
    

    解决方法

    useSSL=true改为useSSL=false

  • 相关阅读:
    URAL 2080 莫队
    Codeforces Round #361 (Div. 2) C D
    UVALive 7297 bfs
    UVALive 7472
    HDU 5773 最长上升子序列
    递归求解最大值和最小值
    数字方阵旋转问题
    实现循环队列的各种基本运算
    实现顺序栈的各种基本运算
    使用两个栈来实现队列
  • 原文地址:https://www.cnblogs.com/fengxiaoqi/p/12932764.html
Copyright © 2011-2022 走看看