Possible Duplicate:
how to check and set max_allowed_packet mysql variable
I am having some database issues and I want to increase my max_allowed_packet timer and decrease wait_timeout. Is there a way to set it through PHP like ini_set ( 'memory_limit', '32M' ); or something similar ?
Yes, you can issue the SQL
to change the value of
max_allowed_packet, but as it is a global variable be aware that you have to reconnect for the change to become effective because changing global system variables does not affect currently open connections.wait_timeoutis a normal session variable that you can easily change for the current connection using