Mysql
brew info mysql
mkdir -p ~/Library/LaunchAgents
cp `brew --prefix mysql`/*mysql*.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/*mysql*.plist
or
cp /usr/local/opt/mysql/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Mongod
Create a file call org.mongo.mongod.plist in /Library/LaunchDaemons/
If you use vim you can do like this:
sudo vim /Library/LaunchDaemons/org.mongo.mongod.plist
Copy and paste this:
Also, you will need to create a file for the log and a directory for the database.
sudo touch /var/log/mongodb.log
sudo mkdir /var/lib/mongodb
And run this in your terminal:
sudo chown root:wheel /Library/LaunchDaemons/org.mongo.mongod.plist
sudo launchctl load /Library/LaunchDaemons/org.mongo.mongod.plist
sudo launchctl start org.mongo.mongod
Redis
To have launchd start redis at login:
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
Then to load redis now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Or, if you don't want/need launchctl, you can just run:
redis-server /usr/local/etc/redis.conf