In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the knowledge of "MYSQL complex query timeout how to connect lost Error and typos". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The use of MYSQL complex queries is relatively rare, and you are aware of MYSQL's ability to handle OLAP and complex statements, and you may see the following when dealing with complex statements.
If the result doesn't come out, just Lost connection to MySQL server during query.
When the statement is executed locally in MYSQL, there is no similar error report.
After the following adjustment, you can query out, there will be no more Error Code 2013, Lost connection to Mysql server during query wrong report.
So where is the problem? we need to look at it from two aspects.
1 server
2 client
From the point of view of the service side, there are several points to pay attention to.
1 connect_timeout
This is the number of seconds to wait for package transmission before terminating the connection. By default, it is only 10 seconds.
2 net_read_timeout
When a network problem, such as a query between the MYSQL server and the client, is waiting to terminate the read operation, net_read_timeout controls the timeout, especially if a large amount of data is returned.
The participation of 3 max_allowed_packet defaults to 16MB. If the packet sent at a time is greater than this number, the connection will be terminated (generally speaking, the disconnection between Client and server caused by this is relatively rare. If it is common, please see if there is any misunderstanding about the use of MYSQL).
After adjusting these parameters, many people still find whether the query fails (using workbench in the example) or disconnects automatically in 30 seconds.
Then take a look at the settings of the client you are using. In this example,
You can refer to some of the numeric settings on the diagram, especially
The two parameters DBMS connection read timeout interval and DBMS connection timeout intrval.
In the above example, only on the server side, the net_read_timeout time is increased from 30 seconds to 900 seconds, and the DBMS connection read timeout interval is adjusted on the client side. Slower queries can be displayed on the client side.
The above example is OK in MYSQL 5.7.23 and MYSQL 8.018. With the application of MYSQL 8, how much is the difference between MYSQL 5.7and MYSQL 8 in replication query? we should take a good look at this and ask for an upgrade with the leader.
This is the end of the content of "how to connect lost Error and typos in MYSQL complex query timeout". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.