How to add MySQL and/or ColdFusion to your PATH on the Mac

If your on a mac and working w/ MySQL and/or ColdFusion, you'll probably find it handy to have these added to your PATH. These instructions assume you're using the Bash shell and you've installed MySQL 5 from binary and ColdFusion 8 standalone in their default locations. If you've built MySQL from source and changed it's location or you've chosen an alternative configuration for your ColdFusion server, you probably know what you're doing and these instructions are likely beneath you anyways. I also won't get into any installation details, this is just to get these processes in you PATH so that it's more convenient to manage them from the terminal.

Ready? Let's do it...

We're going to edit your .bash_login file. Unless you've created one previously, you probably don't have one yet. Open a terminal window and enter this line:
pico ~/.bash_login

Copy this into the editor:
export PATH="/usr/local/mysql/bin:/Applications/ColdFusion8/bin:$PATH"

Save (Write) the file by hitting control O and close pico with control x. Now execute it with
. ~/.bash_login
Don't expect much feedback from the shell on this command, just know that when you see the prompt return (within milliseconds) all is good.

Now your good to go using mysql and mysqladmin without typing in the full path. Same goes for managing the ColdFusion process which is described in Adobe's LiveDocs.

As a footnote, if you're interested in Bash startup files, be sure to check out the Bash Reference Manual.