How to change the replicate_*_table variable without modifying my.cnf?
Unfortunately the replicate-do|ignore-db|table variables cannot be set dynamically. In fact, they're a bit weird, since they're not even presented in SHOW GLOBAL VARIABLES output.

So you have to specify these params in the my.cnf file.

Just as final note, regardless of these particular params, whenever you set a global variables dynamically (e.g. SET GLOBAL sql_mode := 'TRADITIONAL') and then restart the mysqld server -- your changes are lost. Whenever the server starts up, it's what's written in the config file that takes place. No persistence for online changes.