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

How to deal with errors in MYSQL reading communication packets

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following content mainly brings you MYSQL reading communication packets error handling methods, the knowledge here is slightly different from books, are summed up by professional and technical personnel in the process of contact with users, have a certain experience sharing value, hope to bring help to the majority of readers.

Possible reasons:

1. Network problem, whether there is a problem with the network, it takes more than connect_timeout time to get a data packet

2. Whether the account password is correct

3. Whether the client has permission to connect to the database

4. Does the connection package have the correct information?

5. The general situation of Aborted Connection is that the network is not good, the client exception crash and so on. In short, it does not close normally after the connection is opened.

If none of the above is the problem, you can try to increase the max_allowed_packet_size (max_allow_packet=256M), or use php's short connection instead of a long connection, or close the connection after each query is completed

Avoid The client had been sleeping more than wait_timeout or interactive_timeout seconds without issuing any requests to the server. (client connection hibernation time exceeds wait_timeout,interactive)

There is really no way to do this. You can enable general query log to list the sql of all queries.

Still can not solve, that is, the underlying reasons, network equipment failure and so on.

Simulation: open multiple clients under linux, and each client logs in to mysql, and then under one of the linux clients, we force kill other mysql clients to log in while monitoring the error_log situation, and the above log situation can occur.

For the above error handling methods for MYSQL reading communication packets, if you need to know more, you can continue to pay attention to the innovation of our industry. If you need professional answers, you can contact the pre-sales and after-sales on the official website. I hope this article can bring you some knowledge updates.

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