I've edited my.ini
in the directory where MySQL is installed and inserted
max_allowed_packet=50M
under the [mysqld]
section, but when I launch the MySQL command line and do:
show variables like 'max_a%'
It still shows a value of 1048576. I've rebooted the box, but to no avail.
EDIT: I believe the issue was that MySQL was reading one of the (many) other config files (e.g., my-huge.ini). I re-ran the MySQL config wizard and it appears to be honoring the settings in my.ini now.
(btw: Why so many configs?!?)
You're most likely confusing 'global' and client variables. Try:
show global variables like 'max_a%';
Make sure you're specifying the option under "[mysqld]" as well. Dominik's recommendation regarding modifying the correct config file is key, regardless.
The following page shows the different directories from which MySQL reads the configuration files: http://dev.mysql.com/doc/refman/5.1/en/option-files.html