[英]How do I change mysql $PATH on mac OSX?
After updating .bash_profile
, I'm getting the below path on terminal 更新
.bash_profile
,我在终端上得到以下路径
Fahads-MacBook-Pro:~ jim$ cat .bash__profile
export PATH=${PATH}:/usr/local/mysql/bin
Fahads-MacBook-Pro:~ jim$ which mysql
/usr/local/mysql/bin/mysql
May be for this reason service mysql stop
command is also not working! 可能是由于这个原因,
service mysql stop
命令也无法正常工作! I want to make the $PATH to /usr/local/mysql/bin
. 我想使$ PATH到
/usr/local/mysql/bin
。
First shutdown mysql 第一次关闭mysql
mysqladmin -uroot -p shutdown
Then, launch mysqld by hand 然后,手动启动mysqld
mysqld --defaults-file=...
or if MySQL is running with all defaults and you are just changing datadir, do this 或者如果MySQL在所有默认值下运行,而您只是在更改datadir,请执行此操作
mysqld --datadir=/path/to/mysql/data
Here is a StackOverflow question (MySQL 'my.cnf' location?) with multiple suggestions on where my.cnf might be for Mac OS when installed . 这是一个StackOverflow问题(MySQL的“ my.cnf”位置?),其中包含有关安装Mac OS的my.cnf可能在何处的多个建议。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.