无法从命令行mac访问mysql [英] can't access mysql from command line mac
本文介绍了无法从命令行mac访问mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
mysql位于/usr/local/mysql/bin/mysql
在终端中键入mysql --version
时,找不到命令.这是因为套接字路径错误吗?如果可以,我该如何解决?
I get command not found when I type mysql --version
in the terminal. Is this because the socket path is wrong? if so how do I fix it?
谢谢
推荐答案
只需在您的终端上执行以下操作:
Just do the following in your terminal:
echo $PATH
如果给定路径不在该字符串中,则必须这样添加:export PATH=$PATH:/usr/local/
或export PATH=$PATH:/usr/local/mysql/bin
If your given path is not in that string, you have to add it like this: export PATH=$PATH:/usr/local/
or export PATH=$PATH:/usr/local/mysql/bin
这篇关于无法从命令行mac访问mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文