Can't start MySQL server because of wrong file permissions?
The entire folder should be owned by mysql
cd /usr/local/mysql-5.6.21-osx10.8-x86_64/data/
chown -R mysql:mysql *
Then go restart mysql
Give it a Try !!!
I find another reason for the same error. I use homebrew to install mysql.
The server could not be stopped by simply use the command:
mysql.server stop
The mysql process will automatically restart. The only way to stop that is using this command:
brew services stop mysql
Then, you could fix issue with root user.
Don't forget that things like apparmor can block write access to directories for mysql, as well.
See places like /etc/apparmor.d/usr.sbin.mysqld, and give "** rwk" to your mysql datadir. (Needs apparmor restart) See place like /var/log/kern.log for apparmor reports.