I want to login to mysql console and set the max packet variable and then exit from the mysql console. I have written the following:
mysql -u root -proot
SET GLOBAL max_allowed_packet=509715201
exit
it only login to mysql and doesn't do anything else.