How to use the MAMP Mysql command line client in a terminal

Open Terminal on your make and do the following

/Applications/MAMP/Library/bin/mysql -uroot -p

The -uroot tells the client you want to log in as user ‘root’ if you have other users you could equally log in as those. The -p tells the client to ask for a password, you can pass the password to the client so it won’t ask, but this will leave your password dangling in places like your bash history file. If you don’t care about that – then by all means change the -p to -psecret where your password replaces ‘secret’.

If you leave the -p as it is, you’ll be prompted for your password, which you can see on the MAMP ‘start page’ in case you have forgotten. If you have done it right you should now see a command line prompt like this:

mysql>