Mediante SET GLOBAL / SET SESSION podemos modificar ciertos valores de MySQL, pero no aceptan unidades:
mysql> set session max_allowed_packet=20M; ERROR 1232 (42000): Incorrect argument type to variable 'max_allowed_packet'
En lugar de tener que calcularlo fuera del MySQL, podemos indicar la operación. Por ejemplo, para 20M podemos indicar 20*102*1024:
mysql> show variables like 'max_allowed_packet'; +--------------------+----------+ | Variable_name | Value | +--------------------+----------+ | max_allowed_packet | 10485760 | +--------------------+----------+ 1 row in set (0.00 sec) mysql> set session max_allowed_packet=20*1024*1024; Query OK, 0 rows affected (0.00 sec) mysql> show variables like 'max_allowed_packet';[Lea más...]



