Variable names are case sensitive:
mysql> mysql> SET @x = 1; SELECT @x, @X; Query OK, 0 rows affected (0.00 sec) +------+------+ | @x | @X | +------+------+ | 1 | 1 | +------+------+ 1 row in set (0.00 sec) mysql> mysql>