mac----,bash: mysql: command not found

1.处理mac,mysql -uroot -p123456问题

mac----,bash: mysql: command not found
一下子就报这个错误,看着头疼

2.解决方案

1.cd ~

mac----,bash: mysql: command not found

2.touch .bash_profile

mac----,bash: mysql: command not found

3.open -e .bash_profile

mac----,bash: mysql: command not found
会出来这个
mac----,bash: mysql: command not found

4.加:export PATH=$PATH:/usr/local/mysql/bin

mac----,bash: mysql: command not found

编辑完成之后,需要按保存!!!!!!!!!!!!!!!!!!

5.source ~/.bash_profile

mac----,bash: mysql: command not found

6.再次输入:mysql -uroot -p你的密码

mac----,bash: mysql: command not found

下面出现mysql>就代表成功了,然后自己再关闭浏览器,看看。是否成功!