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

The method to solve the problem of sql file source error caused by MySQL max_allowed_packet

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly tells you how to solve the problem of sql file source error caused by MySQL max_allowed_packet. You can check the relevant professional terms on the Internet or find some related books to supplement them. We will not dabble here, so let's go straight to the topic. I hope this article can bring you some practical help to solve the problem of sql file source error caused by MySQL max_allowed_packet.

Export the data through mysqldump and open a screen on the target machine to execute source to import the data. After a while, I looked at it and found that the import was wrong. The error message is as follows:

At first, I thought it was the problem of sql_mode setting, changed sql_mode to loose mode, imported it again or reported an error.

I looked it up online, http://blog.goyiyo.com/archives/1535.

Set global max_allowed_packet=524288000; is set to 512MB

Quit mysql and then log in to source.

The reason is that the previous installation of this mysql, no parameters have been modified, with the default configuration, various parameters are set relatively small. We also need to improve / etc/my.cnf according to our business scenario and hardware configuration. Or you'll step in a hole like this next time.

To solve the problem of sql document source error caused by MySQL max_allowed_packet, let's stop here. If you want to know about other related issues, you can continue to pay attention to our industry information. Our section will capture some industry news and professional knowledge to share with you every day.

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