mac mysql5.7パスワードは不要
2087 ワード
mysqlパスワードエラーエラーエラーERROR 1045(28000):Access denied for user'root'@'localhost'(using password:YES)問題
macバージョン5.7 brewインストールbrew [email protected]
出力プロンプトに従って、次の操作を行います.
To connect run: mysql -uroot
ヒント:mysql-urootはパスワードを必要としないことを発見して入ることができて、穴のお父さん、半日
5.7以降のバージョン観察インストール完了時にメッセージを出力し、バージョン出力ランダムパスワードがディレクトリの下に保存されている
macバージョン5.7 brewインストールbrew [email protected]
出力プロンプトに従って、次の操作を行います.
vim ~/.bash_profile
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/[email protected]/include"
source ~/.bash_profile
/usr/local/opt/[email protected]/bin/mysql.server start
To connect run: mysql -uroot
ヒント:mysql-urootはパスワードを必要としないことを発見して入ることができて、穴のお父さん、半日
5.7以降のバージョン観察インストール完了時にメッセージを出力し、バージョン出力ランダムパスワードがディレクトリの下に保存されている
==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/bottles/mysql%405.7-5.7.29.catalina.bottle.tar.gz
Already downloaded: /Users/chenjiaxing/Library/Caches/Homebrew/downloads/fbe685d09ba668b38df6cd927290a5fcdfe91fb6e789e83e42ec7e07ef027b82--mysql@5.7-5.7.29.catalina.bottle.tar.gz
==> Reinstalling [email protected]
==> Pouring [email protected]
==> Caveats
We've installed your MySQL database without a root password. To secure it run:
mysql_secure_installation
MySQL is configured to only allow connections from localhost by default
To connect run:
mysql -uroot
[email protected] is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have [email protected] first in your PATH run:
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
For compilers to find [email protected] you may need to set:
export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/[email protected]/include"
To have launchd start [email protected] now and restart at login:
brew services start [email protected]
Or, if you don't want/need a background service you can just run:
/usr/local/opt/[email protected]/bin/mysql.server start
==> Summary
/usr/local/Cellar/[email protected]/5.7.29: 319 files, 232.3MB