I've changed it in xampp/mysql/bin/my.ini and still, the effect does not show after restarting MySQL. If I run the following command, it works:
mysql --max_allowed_packet=512M -u root < .\db\dropUser.sql
But, when I browse pages with Drupal, my limit is back to 1Mb, despite the fact that my my.ini file has the value 512 in it.