安装mysql


 TL;DR
在 macOS 上用 Homebrew 安装 MySQL 8.4:安装、安全初始化和后台服务启动。
难度 中等
brew install mysql@8.4
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 -u root

To start mysql@8.4 now and restart at login:
  brew services start mysql@8.4
Or, if you don't want/need a background service you can just run:
  /opt/homebrew/opt/mysql@8.4/bin/mysqld_safe --datadir\=/opt/homebrew/var/mysql
==> Summary
🍺  /opt/homebrew/Cellar/mysql@8.4/8.4.8_2: 321 files, 315.2MB
==> Running `brew cleanup mysql@8.4`...
Disable this behaviour by setting `HOMEBREW_NO_INSTALL_CLEANUP=1`.
Hide these hints with `HOMEBREW_NO_ENV_HINTS=1` (see `man brew`).
==> Caveats
==> mysql@8.4
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 -u root

To start mysql@8.4 now and restart at login:
  brew services start mysql@8.4
Or, if you don't want/need a background service you can just run:
  /opt/homebrew/opt/mysql@8.4/bin/mysqld_safe --datadir\=/opt/homebrew/var/mysql

文章作者: growdu
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 growdu !
  目录