linux 后台日志 mysql 错误异常解释

Linux环境下KDTS迁移MySQL到KingbaseES的保姆级教程(含常见错误排查) 本文提供了一份在Linux环境下使用KDTS工具将MySQL数据库迁移至KingbaseES的详细教程。内容涵盖迁移前的环境与数据准备、KDTS部署启动、核心迁移流程配置,并重点解析了迁移过程中常见的结构及数据错误排查方法,旨在帮助用户顺利完成数据库迁移并规避潜在问题。 阅读详情

1、Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 

The last packet successfully received from the server was 56,201,339 milliseconds ago.  The last packet sent successfully to the server was 56,201,339 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.

at sun.reflect.GeneratedConstructorAccessor257.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:534)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3291)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1938)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2107)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2086)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2237)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
at org.hibernate.loader.Loader.doQuery(Loader.java:674)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2213)

... 45 more

解释:

       最后从服务器接收到数据包成功是56201339毫秒。最后一个数据包发送成功服务器56201339毫秒。长于服务器配置“wait_timeout”的价值。你应该考虑到期和/或有效性测试连接在应用程序中使用之前,增加服务器为客户机超时配置值,或使用连接器/ J连接属性“autoReconnect = true”来避免这个问题。

linux 下/etc/mysql/mysql.cnf

mysql.cnf文件

#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
# 
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html


# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock


# Here is entries for some specific programs
# The following values assume you have at least 32M ram


# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0


[mysqld]
wait_timeout=86400000
interactive_timeout=86400000

#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1
bind-address = 0.0.0.0
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover         = BACKUP
#max_connections        = 100
max_connections        = 10000
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id = 1
log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 14
max_binlog_size         = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem






[mysqldump]
quick
quote-names
max_allowed_packet = 16M


[mysql]
#no-auto-rehash # faster start of mysql but no tab completition


[isamchk]
key_buffer = 16M


#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/


lower_case_table_names = 1

mysql连接错误:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 一、遇到问题在电脑上面有多个mysql版本的时候。可能会启用之前的mysql版本的执行路径,所以导致出现了这个mysql连接错误。二、找到报错具体原因。三、解决办法:一般是由于服务里面的mysql没有启动,去把MySQL的服务启动一下就好了 阅读详情

相关推荐

mysql 报com.mysql.jdbc.exceptions.jdbc4.CommunicationsException

早上看日志发现连接超时报错: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was48477 seconds ago.The last packet sent successfully to the s

科学的N次方 3730

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

在JDBC URL中使用autoReconnect属性,实际测试时使用了autoReconnect=true&failOverReadOnly=false,网上所说的只对mysql 4之前的版本有效。重启生效,需要同时修改这两个参数。

慕白Lee的博客 8394

解决Cause com.mysql.jdbc.exceptions.jdbc4.CommunicationsException

Cause com.mysql.jdbc.exceptions.jdbc4.CommunicationsException The last packet successfully received from the server was 47,795,922 milliseconds ago. The last packet sent successfully to the server was 47,795,922

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException

概述:mysql版本5.6,错误信息如下: ### Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 690,750,831 milliseconds ago. The last packet sent...

Lam's IT Story 1222

Lattice FPGA 开发工具Diamond使用流程总结——工具使用

本文介绍了一般的Diamond开发流程,包括工程创建、文件输入、IP使用、约束、管脚分配、和布线布局等流程

weixin_41895751的博客 2万+

思科9117AP从零配置EWC模式实战:Wi-Fi6网络搭建避坑指南

本文详细介绍了思科9117AP在Wi-Fi6网络环境下配置EWC模式的实战指南,涵盖镜像准备、网络环境配置、模式转换步骤及高级运维技巧。通过EWC模式,企业可实现控制器与AP的一体化部署,显著降低成本和简化运维,特别适合中小企业Wi-Fi6网络搭建。

weixin_28318011的博客 332

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 52,705,191 milliseconds ago. The last packet sent successfully to the serv

波子汽水 6392

Unity PSD分层导入插件ps2d原理与实战指南

PSD作为UI设计主流源文件,其图层结构、混合模式、文字矢量属性等核心语义在传统引擎导入中普遍丢失,导致设计还原度低、多语言适配难、运行时不可控。ps2d通过深度解析PSD二进制规范,将图层映射为GameObject树、文字转为TextMeshPro可编辑组件、形状生成矢量Mesh、蒙版与图层样式编译为定制Shader,实现设计意图的精准程序化表达。该方案显著提升UI开发效率,支撑高保真还原、动态修改、分辨率自适应及运行时热重载等工程需求,是Unity中连接设计师与程序员的关键工作流中枢。

weixin_32943857的博客 348

centos mysql 错误日志_linux 后台日志 mysql 错误异常的解释(推荐)

1、Caused by: com.MySQL.jdbc.exceptions.jdbc4.CommunicationsException:The last packet successfully received from the server was 56,201,339 milliseconds ago. The last packet sent successfully to the se...

weixin_39998881的博客 208

NVIDIA B300 vs B200:详细解析与性能对决

详细解析 NVIDIA B300 整机)的性能,并与前代的 B200 进行对比。它不仅在核心计算能力(FP8)上实现了飞跃,更重要的是通过革命性的第二代 Transformer Engine 和第五代 NVLink 技术,彻底重塑了大规模 AI 模型训练和推理的效率与规模上限。其显存容量和带宽的巨大提升也为处理超大型模型和数据提供了坚实基础。与 B200 相比,B300 是一次全面的、代际性的性能跃升,特别适合那些需要处理最前沿、最复杂 AI 和科学计算任务的用户和组织。

2401_89353317的博客 3041

Data+AI新玩法:Text2SQL让数据查询变得如此简单!

你是不是也遇到过这种情况?明明手头有海量数据,却因为SQL这道“门槛”,让分析和决策变得复杂和拖沓。你可能想着:“要是我能直接用自然语言和数据库对话,那该多好!你不是一个人在这样想,Text2SQL技术正是为了帮你摆脱这一困境而诞生的。

Ase5gqe的博客 865

mysql linux 错误_linux 后台日志 mysql 错误异常的解释(推荐)

1、Caused by: com.MySQL.jdbc.exceptions.jdbc4.CommunicationsException:The last packet successfully received from the server was 56,201,339 milliseconds ago. The last packet sent successfully to the se...

weixin_39541750的博客 200

手把手实战:RK3588上YOLOv8模型从训练到部署全流程解析

本文详细解析了在RK3588开发板上部署YOLOv8目标检测模型的全流程。从模型训练、正确导出适配的ONNX格式,到使用RKNN-Toolkit2进行模型转换与量化,最后在板卡上完成部署与性能测试。文章提供了完整的代码示例和关键避坑指南,帮助开发者高效实现嵌入式AI应用落地。

weixin_28224217的博客 404

linux mysql的错误日子在,linux 后台日志 mysql 错误异常的解释(推荐)

1、Caused by: com.MySQL.jdbc.exceptions.jdbc4.CommunicationsException:The last packet successfully received from the server was 56,201,339 milliseconds ago. The last packet sent successfully to the se...

weixin_32938207的博客 238

自监督学习原理与代码实战案例讲解

自监督学习原理与代码实战案例讲解 作者:禅与计算机程序设计艺术 1. 背景介绍 1.1 自监督学习的起源与发展 1.1.1 监督学习的局限性

AI天才研究院 623

YOLOv8改进 | 融合篇,YOLOv8改进主干网络为MobileNetV4+CBAM注意机制+Powerful-IoU损失函数(2024 最新IOU),全网首发,实现极限涨点

本文将在 YOLOv8 主干中引入 MobileNetV4 轻量化骨干,同时,在检测头引入 CBAM机制注意力机制,并采用 Powerful-IoU 损失函数作为模型的损失函数,其中,MobileNetV4 通过引入通用反向瓶颈(UIB)搜索块和 Mobie MQA 注意力模块创新设计,实现了模型的轻量级化;同时,MobileNetV4 采用了优化的 NAS 策略,通过粗粒度和细粒度搜索相结合的方法,显著提高了搜索效率并改善了模型质量。

在职AI算法工程师,擅长计算机视觉,YOLO目标检测、分割等,擅长web、pyqt界面可视化,好内容持续更新中,来这里跟大家一起学习,共同进步 3783

linux mysql 语法错误_linux 后台日志 mysql 错误异常的解释(推荐)

1、Caused by: com.MySQL.jdbc.exceptions.jdbc4.CommunicationsException:The last packet successfully received from the server was 56,201,339 milliseconds ago. The last packet sent successfully to the se...

weixin_32248531的博客 248

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

MySQL服务器日志-Error Log(错误日志)

如何配置MySQL服务器以将诊断信息记录到错误日志。 错误日志包含mysqld的开启和关闭时间的记录。 也包含了诊断信息,包括发生在启动,关闭,运行服务器期间的错误,警告,注释。 例如,如果mysqld注意到需要自动检查或修复表,会向错误日志中写入一条信息。 在某些操作系统,当mysqld异常退出,错误日志包含堆栈跟踪。这个跟踪被用来确定mysqld退出的位置。 如果用于启动mysqld,mysqld_safe会写信息到错误日志。 例如,当mysqld_safe注意到mysqld异常退出,它会重

Nede的博客 2560

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

linux关闭mysql日志记录_linux 下mysql 运行一段时间后自动关闭,日志无异常

5月5日启动mysql,6月5日5:01:04mysql关闭,启动后运行正常,日志如下(ps:mysql关闭后,ssh登录不了服务器)15050509:49:19mysqld_safeStartingmysqlddaemonwithdatabasesfrom/var/...5月5日启动mysql,6月5日5:01:04 mysql关闭,启动后运行正常,日志如下(ps: mysql 关闭后,ssh ...

weixin_42298039的博客 163

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

linux将mysql的错误连接数_运维日记|MySQL关于aborted告警日志的分析

又是一个季度一次的现场巡检,期待数据库能跑的又快又稳,毕竟这是对DBA最大的馈赠了。​结果不遂人意发现在错误日志内存在大量的如下报错:查看当前数据库的状态值:查看数据库关于数据库会话的关键参数:数据库环境及相关参数connect_timeout10interactive_timeout28800wait_timeout28800max_connections151net_write_timeout...

weixin_39550940的博客 370

zabbix mysql错误日志_通过日志linux查看zabbix-agent启动报错

本文主要介绍了通过日志linux查看zabbix-agent启动报错,通过具体的解释说明,让我们从中学到通过日志linux查看zabbix-agent启动报错的精髓所在,让我们对Linux内部原理越来越熟悉,希望大家能够在以后的学习中更加快速的弄明白其中的关键。便于更好的操作。下面开始分析问题,通过日志可以看到zabbix-agent需要的交换内存大小是949056,远小于kernel.shmma...

weixin_39886841的博客 801

linux mysql dbs.pid_解决Linux下MySQL启动错误Starting MySQL.Manager of pid

上午刚装完MySQL,启动时报如下错误:Starting MySQL.Manager of pid-file quit without updating file.[FAILED]依次尝试了从谷姐找到的各种方法,发现只要执行如下MySQL初始化命令即可解决:Shell1/usr/local/mysql/bin/mysql_install_db --user=mysql下面附上从谷姐找到的解决此问题...

weixin_29325515的博客 380

Linux mysql 1366错误_mysql 1366错误:字符集冲突导致插入数据异常,解决方案_MySQL...

一:异常信息:errorCode:1366Caused by: java.sql.SQLException: Incorrect string value: '\xE7\xAE...' for column 'description' at row 1二:异常原因:字符集冲突mysql insert入库的时候,由于插入数据编码与数据库字段字符集不一致,导致数据无法插入。三:追本溯源在mysql数据...

weixin_42508185的博客 323

Linux 日志管理

Linux 有三个主要日志子系统:     连接时间日志--由多个程序执行,把记录写入到/var/log/wtmp和/var/run/utmp,login等程序更新wtmp和utmp文件,使系统管理员能够跟踪谁在何时登录到系统。   进程统计统计--由系统内核执行。当一个进程终止时,为每个进程往进程统计文件(pacct或acct)中写一个记录。进程统计的目的是为系统中的基本服务提供命令使...

Knowledge management 伍波露 530

在Linux中安装MySQL

准备工作 检查当前系统是否安装过MySQL 在CentOS6的环境下输入rpm -qa|grep mysql命令查看 出现如上图的内容表示Linux默认安装时自带了mysql相关的组件,但我们需要卸载掉自带的mysql,所以执行rpm -e --nodeps mysql-libs命令 MySQL的安装 MySQL Linux版的下载 安装的版本是mysql5.7,在官网下载https://dev.mysql.com/downloads/mysql/5.7.html#downloads

二木成林 2878
上一篇: JSTL 核心标签库 使用
下一篇: Java中Json格式数据的应用
OnePiece_Sky
博客等级 码龄15年 9粉丝 63原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值