sed s/^character-set-server=utf8/#character-set-server=utf8/’ -i /etc/my.cnf
If you want comment on this this line “character-set-server=utf8” on all your servers, you should use something like ansible:
ansible mysql_servers -m shell -a “sed -e ‘s/^character-set-server=utf8/#character-set-server=utf8/’ -i /etc/my.cnf”