【환경구조】mysql:command not found

mysql: command not found


$mysql --version
mysql: command not found
$ brew install mysql
brew: command not found
Homebrew 설치
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
성공했지만
Warning: /~/homebrew/bin is not in your PATH.
==> Installation successful!
및😭
brew -v
-bash: brew: command not found

해결책


export PATH="$PATH:/~/homebrew/bin" 

vi ~/.zshrc
# .bashrc または、.bash_profile

# 以下を追加して保存して閉じる
export PATH=/~/homebrew/bin:$PATH

# 設定を再読み込み(これでターミナル入るたびパス通さなくて済む)
echo "source ~/opt/anaconda3/etc/profile.d/conda.sh" >> ~/.zshrc
$brew -v
Homebrew 3.1.9
Homebrew/homebrew-core (git revision 7c5cef98411; last commit 2021-06-03)
해결
$mysql --version
mysql  Ver 8.0.25 for Linux on x86_64 (Homebrew)

인용하다


https://qiita.com/Naggi-Goishi/items/2c49ea50602ea80bf015
https://qiita.com/yoshinyan/items/38bc4e4a02a66acead91
https://chicog.me/articles/1/
https://qiita.com/ketaro-m/items/cba09f5e3f89bd8ed935