mysqlvariablesphpmyadmin

How to set max_allowed_packet in phpmyadmin?


I have to change max_allowed_packet size in MySQL using phpmyadmin, but I don't know how to do it. When I try set global max_allowed_packet=10M in phpmyadmin it give this error

#1227 - Access denied; you need the SUPER privilege for this operation

I can't get SUPER privilege, because server is not in my control.

So, How can I change it?


Solution

  • You cannot.

    To change it dynamically, as with the SET you tried, you need the SUPER privilege, there is no way around it. And this is a good thing, because 1. the setting is global, which means it affects all connections, and 2. it might jeopardize the server (it makes it easier to DoS a server, for example).

    To set it permanently, you need access to the MySQL configuration file and be able to restart the service, as Zak advises.

    The real question is, however, why do you need such a high limit. Unless you are trying to import a large dump, having a need for such a limit almost always suggests something was wrongly designed in the first place. If you are importing a dump, try to import smaller bits at a time.