mac安装mysql

mac安装mysql比较简单,直接使用命令brew install mysql即可。安装过程所示:

$ brew install mysql
Updating Homebrew...
==> Downloading https://homebrew.bintray.com/bottles/mysql-8.0.16.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/65/65e6629740ca75ceaae575b4cc68f2cf133619d08cdcd4cb2dee9737ce5fad3a?__gda__=
==> Pouring sphinx-doc-2.1.2.mojave.bottle.tar.gz
==> Caveats
sphinx-doc is keg-only, which means it was not symlinked into /usr/local,
because this formula is mainly used internally by other formulae.
Users are advised to use `pip` to install sphinx-doc.

If you need to have sphinx-doc first in your PATH run:
  echo 'export PATH="/usr/local/opt/sphinx-doc/bin:$PATH"' >> ~/.bash_profile

==> Summary
  /usr/local/Cellar/sphinx-doc/2.1.2: 3,728 files, 53.3MB
==> Downloading https://github.com/Kitware/CMake/releases/download/v3.15.0/cmake-3.15.0.tar.gz
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/537699/f28e3200-a886-11e9-8faf-4fbbd8a1
==> Pouring mysql-8.0.16.mojave.bottle.tar.gz
==> /usr/local/Cellar/mysql/8.0.16/bin/mysqld --initialize-insecure --user=wangfei --basedir=/usr/local/Cellar/mysql/8.0.16
==> 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

To have launchd start mysql now and restart at login:
  brew services start mysql
Or, if you don't want/need a background service you can just run:
  mysql.server start
==> Summary
  /usr/local/Cellar/mysql/8.0.16: 275 files, 269.8MB

 

你可能感兴趣的:(mysql,mac,MySQL,mac)