brew install mysql

8次阅读
没有评论

brew install mysql
==> Auto-updating Homebrew…
Adjust how often this is run with $HOMEBREW_AUTO_UPDATE_SECS or disable with
$HOMEBREW_NO_AUTO_UPDATE=1. Hide these hints with $HOMEBREW_NO_ENV_HINTS=1 (see man brew).
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
==> Downloading https://formulae.brew.sh/api/formula.jws.json
bismark: Bisulfite read mapper and methylation caller
bracken: Bayesian estimation of species abundance from Kraken output
cyclonedx-npm: Creates CycloneDX Software Bill of Materials (SBOM) from npm projects
libyojimbo: Secure client/server network protocol library for multiplayer games
mktxp: Prometheus Exporter for Mikrotik RouterOS devices
mosdepth: Fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing
rocq-micromega-plugin: Micromega decision procedures plugin for the Rocq prover

You have 15 outdated formulae installed.

==> Would install 1 formula:
mysql
==> Downloading https://ghcr.io/v2/homebrew/core/mysql/manifests/9.7.1-1
curl: (35) Recv failure: Connection reset by peer# #

==> Would install 3 dependencies for mysql:
abseil
protobuf
zlib-ng-compat
==> Would upgrade 1 dependency for mysql:
openssl@3
==> Do you want to proceed with the installation? [y/n]
==> Fetching downloads for: mysql
✔︎ Bottle openssl@3 (3.6.3) Downloaded 10.9MB/ 10.9MB
✔︎ Bottle Manifest protobuf (35.1) Downloaded 10.7KB/ 10.7KB
✔︎ Bottle Manifest zlib-ng-compat (2.3.3_1) Downloaded 7.3KB/ 7.3KB
✔︎ Bottle Manifest abseil (20260107.1) Downloaded 63.0KB/ 63.0KB
✔︎ Bottle zlib-ng-compat (2.3.3_1) Downloaded 170.4KB/170.4KB
✔︎ Bottle abseil (20260107.1) Downloaded 1.9MB/ 1.9MB
✔︎ Bottle protobuf (35.1) Downloaded 3.8MB/ 3.8MB
⠚ Bottle mysql (9.7.1) Downloading 19.8MB/——
⠞ Bottle mysql (9.7.1) Downloading 20.0MB/——
⠦ Bottle mysql (9.7.1) Downloading 20.1MB/——
⠲ Bottle mysql (9.7.1) Downloading 20.4MB/——
⠓ Bottle mysql (9.7.1) Downloading 20.4MB/——
✔︎ Bottle mysql (9.7.1) Downloaded 80.7MB/ 80.7MB
==> Installing dependencies for mysql: abseil, openssl@3 ↑, protobuf and zlib-ng-compat
==> Installing mysql dependency: abseil
==> Pouring abseil–20260107.1.arm64_sequoia.bottle.tar.gz
🍺 /opt/homebrew/Cellar/abseil/20260107.1: 806 files, 12.9MB
==> Installing mysql dependency: openssl@3
==> Pouring openssl@3–3.6.3.arm64_sequoia.bottle.1.tar.gz
🍺 /opt/homebrew/Cellar/openssl@3/3.6.3: 7,633 files, 37.8MB
==> Installing mysql dependency: protobuf
==> Pouring protobuf–35.1.arm64_sequoia.bottle.tar.gz
🍺 /opt/homebrew/Cellar/protobuf/35.1: 373 files, 17.7MB
==> Installing mysql dependency: zlib-ng-compat
==> Pouring zlib-ng-compat–2.3.3_1.arm64_sequoia.bottle.tar.gz
🍺 /opt/homebrew/Cellar/zlib-ng-compat/2.3.3_1: 17 files, 445.0KB
==> Installing mysql
==> Pouring mysql–9.7.1.arm64_sequoia.bottle.1.tar.gz
2026-07-13T16:05:40.132375Z 0 [System] [MY-015017] [Server] MySQL Server Initialization – start.
2026-07-13T16:05:40.134737Z 0 [System] [MY-013169] [Server] /opt/homebrew/Cellar/mysql/9.7.1/bin/mysqld (mysqld 9.7.1) initializing of server in progress as process 10278
2026-07-13T16:05:40.136155Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /opt/homebrew/var/mysql/ is case insensitive
2026-07-13T16:05:40.140379Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2026-07-13T16:05:40.180467Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2026-07-13T16:05:40.544386Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the –initialize-insecure option.
2026-07-13T16:05:40.799981Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user . Shutting down mysqld (Version: 9.7.1).
2026-07-13T16:05:41.367073Z 0 [System] [MY-015018] [Server] MySQL Server Initialization – end.
==> Caveats
A “/etc/my.cnf” or “/etc/mysql/my.cnf” from another install may interfere
with a Homebrew-built server starting up correctly.

Upgrading from MySQL <8.4 to MySQL >9.0 requires running MySQL 8.4 first:

  • brew services stop mysql
  • brew install mysql@8.4
  • brew services start mysql@8.4
  • brew services stop mysql@8.4
  • brew services start mysql

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 now and restart at login:
brew services start mysql
Or, if you don’t want/need a background service you can just run:
/opt/homebrew/opt/mysql/bin/mysqld_safe –datadir=/opt/homebrew/var/mysql
==> Summary
🍺 /opt/homebrew/Cellar/mysql/9.7.1: 344 files, 309.5MB
==> Running brew cleanup mysql
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP=1.
Hide these hints with HOMEBREW_NO_ENV_HINTS=1 (see man brew).
==> Caveats
==> mysql
A “/etc/my.cnf” or “/etc/mysql/my.cnf” from another install may interfere
with a Homebrew-built server starting up correctly.

Upgrading from MySQL <8.4 to MySQL >9.0 requires running MySQL 8.4 first:

  • brew services stop mysql
  • brew install mysql@8.4
  • brew services start mysql@8.4
  • brew services stop mysql@8.4
  • brew services start mysql

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 now and restart at login:
brew services start mysql
Or, if you don’t want/need a background service you can just run:
/opt/homebrew/opt/mysql/bin/mysqld_safe –datadir=/opt/homebrew/var/mysql

正文完
可以使用微信扫码关注公众号(ID:xzluomor)
post-qrcode
 0
评论(没有评论)
验证码