如何在MAMP安装上从终端运行mysql命令? [英] How to run mysql commands from terminal on a MAMP install?
问题描述
我刚刚从mamp.info页面安装了mamp(xampp),它可以在我的Mac(apache,php,phpmyadmin和mysql)上运行.唯一的问题是当我尝试运行
I just installed mamp (xampp) from the mamp.info page and it is working on my mac (both apache, php, phpmyadmin, and mysql). The only problem is when i try to run
mysql -u root -p
从mac os终端连接到mamp时,出现命令错误.我已经多次为Mac安装和卸载了mamp和xampp,但无济于事.
Which connects to mamp from the mac os terminal, i get a command error. I have installed and uninstalled mamp and xampp for mac multiple times to no avail.
我正在关注本教程; http://www.raywenderlich.com/2941/how-to-to-write-a-simple-phpmysql-web-service-for-an-ios-app ,但我无法超越某个特定的部分,因为我没有不想使用php admin,我认为从终端使用它会很酷.
I am following this tutorial; http://www.raywenderlich.com/2941/how-to-write-a-simple-phpmysql-web-service-for-an-ios-app and i can't get past a certain part because i don't want to use php admin, and i think it'd be cool to use it from the terminal.
我的问题;如何配置Mac的Mamp或Xampp从终端运行?
My question; how do i configure mamp or xampp for mac to work from the terminal?
推荐答案
将其放在.bash_profile
脚本的末尾(如果尚不存在,则创建它):
Put this at the end of your .bash_profile
script (create it if it doesn't already exist):
export PATH=$PATH:/Applications/MAMP/Library/bin
这篇关于如何在MAMP安装上从终端运行mysql命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!