Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What should I do if the connection to the MySQL server is broken while reading the authorization packet

2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

What to do when the connection with the MySQL server is broken when reading the authorization packet? in view of this problem, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.

Ubuntu 18.04 mysql 5.7.2

Have done the following steps in accordance with the Internet, and restart the mysql service, still not, I do not know why.

1. Most of the time, setting "set global connect_timeout=60;" will solve the problem.

We can observe the Variable_name Value by executing "SHOWSTATUS LIKE 'aborted%'"

Aborted_clients 6

Aborted_connects 15010

Whether or not to increase the connect_timeout time, "Aborted_connects" will increase as the server abandons the client's initial connection. If "Aborted_connects" is large and increasing, you need to add "connect_timeout".

two。 Add "skip-name-resolve" to [mysqld] in MySQL's configuration file to reduce the time for domain name resolution

3. It is better to deploy a server-side network, at least larger than 100Mbps/s

4. If it is a problem when calling mysql_query, you need to change the time of "net_read_timeout" to 30 seconds, or 60 seconds, or more.

5. If you can't solve the problem, then your SQL statement contains a large type like BLOB, so we need to increase the value of "max_allowed_packet".

This is the answer to the question about how to break the connection with the MySQL server when reading the authorization packet. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report