問題描述
我想練習(xí)使用 SQL 而不是 phpMyAdmin.
I want to practice using SQL instead of phpMyAdmin.
如何從終端登錄 MAMP 的 MySQL?
How do I log into MAMP's MySQL from the terminal?
推薦答案
我假設(shè)您使用的 MAMP 版本會(huì)自行安裝在/Applications/MAMP 中.首先通過 MAMP 控制臺(tái)確保 Mysql 服務(wù)器已打開.然后從命令行像這樣連接:
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
顯然替換用戶名和密碼.順便說一句,-u 和用戶名或 -p 和密碼之間沒有空格.
Obviously replace Username and Password. BTW, there is no space between -u and the Username or -p and the Password.
祝你好運(yùn)以舊時(shí)尚的方式學(xué)習(xí) Mysql!
Good Luck learning Mysql the old fashion way!
這篇關(guān)于從終端訪問 MAMP 的 MySQL的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!