mysql system variables... how to edit?

i’ve tried to edit mysql system variables under webmin->mysqlserver setting up wait_timeout to 300.
but then i login into mysql via ssh, i do “SHOW VARIABLES;” and wait_timout=28800…
and if i restart mysql server, and i go into webmin->mysqlserver->mysql system variables wait_timeout=28800 and not =300.
how can i change?
thanks

neorf