The script change GLOBAL variables, but do not apply changes in config files. It must write those variables to /etc/mysql/conf.d/*.cnf files.