updating max_allowed_packet

14,783

max_allowed_packet allowed for dynamic values, that's mean you just need to login to mysql console

show variables like 'max_allowed_packet';
set global max_allowed_packet=33554432;

logout, and login again

show variables like 'max_allowed_packet';

If you do not have the console login, try PHP should work the same way.

Share:
14,783
Admin
Author by

Admin

Updated on June 08, 2022

Comments

  • Admin
    Admin about 2 years

    I have my application hosted on a shared server, I can't access my.cnf/my.ini file from my account, max_allowed_packet is set to 1M only, Now I need to change it to 32M, is their any idea either by PHP or .htaccess to change its value?

    Thanks and Regards Prajjwal

  • Piskvor left the building
    Piskvor left the building over 13 years
    On a shared hosting? It's theoretically possible that the user can set such globals, but unlikely.
  • ajreal
    ajreal over 13 years
    Indeed, dev.mysql.com/doc/refman/5.1/en/set-option.html ... worse, set as session?