Mac Yosemite update - MySQL doesn't automatically start

After updating Mac OSX to Yosemite you might have noticed MySQL doesn't automatically start again.
Here's how to fix it:

Create a file called com.mysql.mysql.plist in /Library/LaunchDaemons.
This file should contain the following data:

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.mysql</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/mysql/bin/mysqld_safe</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
</dict>
</plist>

After reating that file, open Terminal and submit the following commands:

sudo chown root /Library/LaunchDaemons/com.mysql.mysql.plist
sudo chgrp wheel /Library/LaunchDaemons/com.mysql.mysql.plist
sudo chmod 644 /Library/LaunchDaemons/com.mysql.mysql.plist

And last command:

sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysql.plist

Then restart computer and check if the MySql server is autostarted.