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
SET GLOBAL max_allowed_packet=...
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_timeout is a normal session variable that you can easily change for the current connection using
SET SESSION wait_timeout=...
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With