Remote connection MySQL has been appearing these days 2006 ' MySQL server has gone away '

Source: Internet
Author: User


First of all, I developed my own computer's hosts domain name point is admin.xxx.com LAN that computer is admin.test.xxx.com

Now the situation is my browser input admin.xxx.com when there is an error, but the code submitted to the test machine (admin.test.xxx.com) after the input point to the test machine domain name on the above operation will not error.

Project (PHP program) is connected to the LAN test machine MySQL service. My local computer opened Apache. have been good before, these days suddenly appeared in the picture of the error
To search according to what others have said, max_allowed_packet changing the parameters from 1M to 20M seems to be the case.
Use of the CI framework, database configuration and so on have not moved. That's weird.

+--------------------------+------------+| Variable_name            | Value      |+--------------------------+------------+| max_allowed_packet       | 20971520   || slave_max_allowed_packet | 1073741824 |+--------------------------+------------+2 rows in set (0.01 sec)

Am I guessing that it has something to do with the network where I develop the machine to the test machine?

I don't know if anyone can read it. Thank you, everyone.

Reply content:


First of all, I developed my own computer's hosts domain name point is admin.xxx.com LAN that computer is admin.test.xxx.com

Now the situation is my browser input admin.xxx.com when there is an error, but the code submitted to the test machine (admin.test.xxx.com) after the input point to the test machine domain name on the above operation will not error.

Project (PHP program) is connected to the LAN test machine MySQL service. My local computer opened Apache. have been good before, these days suddenly appeared in the picture of the error
To search according to what others have said, max_allowed_packet changing the parameters from 1M to 20M seems to be the case.
Use of the CI framework, database configuration and so on have not moved. That's weird.

+--------------------------+------------+| Variable_name            | Value      |+--------------------------+------------+| max_allowed_packet       | 20971520   || slave_max_allowed_packet | 1073741824 |+--------------------------+------------+2 rows in set (0.01 sec)

Am I guessing that it has something to do with the network where I develop the machine to the test machine?

I don't know if anyone can read it. Thank you, everyone.

Could you post the MySQL log, please?

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.