saltstack-formulas/mysql-formula — pull request #12 by madkinder (2014-05-14 11:51:00+00:00)
Title: Set MySQL root password for CentOS and remove anonymous user

Again, this _could_ work on RedHat, though I haven't checked it.

Also, apart from setting up root password a user with empty name is deleted. Otherwise weird access denied errors happen when trying to authorize from remote hosts.

Debian package performs anynomous user cleanup during installation so it's only necessary for CentOS (and probably RHEL).