Access MAMP's MySQL from Terminal

前端 未结 7 1218
时光说笑
时光说笑 2020-12-07 13:34

I want to practice using SQL instead of phpMyAdmin.

How do I log into MAMP\'s MySQL from the terminal?

7条回答
  •  天命终不由人
    2020-12-07 14:12

    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!

提交回复
热议问题