🎉
【環境構築】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)
参照
Discussion