Monday, August 6, 2012

MySQL command-line utilities on OSX

I was looking for mysql command-line utilities on my mac and couldn't seem to find them. Admittedly, I wasn't looking all that thoroughly. I had previously installed mysql-workbench from here - http://www.mysql.com/downloads/workbench/. I like the gui and everything, but it's nice to know what commands you're running when you do an export, import, show databases, etc. 

Anyway, if you're looking for the command-line utilities, cd here:

/Applications/MySQLWorkbench.app/Contents/Resources/

To help avoid repetitive stress and be more effecient (lazy), I created a couple aliases.

alias mysql='/Applications/MySQLWorkbench.app/Contents/Resources/mysql'
alias mysqldump='/Applications/MySQLWorkbench.app/Contents/Resources/mysqldump'

Hope this helps.
Post a Comment