Connect to mysql in MAMP from terminal in Mac

less than 1 minute read

If you use MAMP and want to connect mysql from terminal, you should use the following command:

  1. Launch MAMP
  2. Start MySql server or all servers
  3. Launch terminal/iterm2, type the command as following:
$ cd /Applications/MAMP/Library/bin
$ ./mysql --host=localhost -uroot -proot

Updated:

Comments