Installing MySQL 5.6 from rpm

Oracle has broken various aspects of installation of MySQL 5.6 via RPM.
See, among others, http://bugs.mysql.com/bug.php?id=72724

If you want to install with a non-default data directory (/db_data/mysql in this example), here are some steps you need to take:

1. set up your /etc/my.cnf with datadir setting, etc
2. install the RPM (yum install MySQL-server)
3. rm /usr/my.cnf (WTF???)
4. mv /var/lib/mysql/* /db_data/mysql/ (installer generally obeys datadir, but 'mysql_install_db' does not)
5. start mysql (service mysql start)
6. clear root password or set it to something else:
TEMPPW=$(foo=`cat /root/.mysql_secret`; echo ${foo##* });
mysql --connect-expired-password -p$TEMPPW -e "SET PASSWORD = '';"

continue as normal.