This looks handy: mycli is a command line interface for your DBs with nifty things like auto-completion and syntax highlighting.