You are here:

MySQL/"MYSQL server has gone away"

Advertisement


Question
QUESTION: Hello,

I don't know anything about MySql editing.

Can you tell me what commands to use to update MySQL settings (increase wait time and max allowed packets)?

Thanks,
Carol

ANSWER: Deat sir

The default mysql wait timeout is very large and should not need editing.

If you do need to change this you need to edit the my.cnf file and chafe the time I there.

---------- FOLLOW-UP ----------

QUESTION: Do you know any other reason I would get this message?

How do I increase the number of "max allowed packets?"

Thank you.

Answer
Dear sir

It's hard to know without fully knowing the situation that caused you to see this error.

The most common reason is uploading files to the db that are to large a packet. The db just drops the connection and you see the mysql server has gone away.

The mysql wait is for mysql to keep open an idle connection open. After the time limit it gets dropped. But this very rarely causes issues with the default settings.

The max allowed packets can depending on what you are doing.

Again to change this change it in the my.cnf file and restart the mysql server.  

MySQL

All Answers


Answers by Expert:


Ask Experts

Volunteer


stuart gregory

Expertise

PHP html, xhtml, css coding and MySQL

Experience

My experiance is all first had as I am web developer and I have, and do build many websites all using php and mysql. This ranges from building a simple search engine to secure php login scripts. Some websites like http://www.web-application-development.info are complete database driven websites.

Organizations
I have a large number of websites which I host and maintain, such as. http://www.webreger.com http://www.universalscience.co.uk http://www.modellingelectronics.co.uk

Education/Credentials
Web application development. (Open University) BSC Honers Computing and development (Open University)

©2016 About.com. All rights reserved.