首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

MySQL 案例:init_connect 引发的 Lost connection

前言 最近发现一个比较奇特的 Lost connection 问题,详细测试和验证了一下,记录下来。 问题描述 用户反馈连接到数据库之后,执行show database的时候会断开连接。...原因分析 从反馈上来看,用户是可以登录到数据库的,说明网络的连通性,用户名密码方面没有问题,权限方面如果有问题的话,一般也不会有 Lost connection 的报错,MTU 的问题一般也是返回不了结果...Not executing init_connect for users that have the SUPER privilege enables them to open a connection...version: 5.7.31-log MySQL Community Server (GPL) ...省略... mysql> show databases; ERROR 2013 (HY000): Lost...connection to MySQL server during query mysql> 发现可以复现 Lost connection 现象,说明问题就在这里了,如果是直接执行了语句,那么报错信息可能会记录在

1.9K112

讲解Connection to the other side was lost in a non-clean fashion

讲解 Connection to the other side was lost in a non-clean fashion在网络通信中,当连接的一方以非干净的方式失去与另一方的连接时,通常会出现"Connection...错误消息含义"Connection to the other side was lost in a non-clean fashion"错误消息表示在进行网络通信时,连接的一方与另一方失去连接,但失去连接的方式不是正常的...解决方法针对"Connection to the other side was lost in a non-clean fashion"错误消息,可以尝试以下解决方法:检查网络连接:确认你的网络连接是否稳定...当出现"Connection to the other side was lost in a non-clean fashion"错误消息时,你可以尝试以下示例代码来处理该错误。...希望以上示例代码能帮助你处理"Connection to the other side was lost in a non-clean fashion"错误消息,并实现稳定的网络通信。

33710
您找到你想要的搜索结果了吗?
是的
没有找到
领券