I'm assuming the version of MAMP you're using installs itself in /Applications/MAMP. First make sure via the MAMP console that the Mysql server is on. Then connect like this from command line:
/Applications/MAMP/Library/bin/mysql -uUsername -pPassword
Obviously replace Username and Password. BTW, there is no space between -u and the Username or -p and the Password.
Good Luck learning Mysql the old fashion way!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…