mysql

Install command:
brew install mysql

Also known as: mysql@26.7

Open source relational database management system

https://github.com/mysql/mysql-server

License: GPL-2.0-only WITH Universal-FOSS-exception-1.0

Development: Pull requests

Formula JSON API: /api/formula/mysql.json

Formula code: mysql.rb on GitHub

Bottle (binary package) installation support provided for:

macOS on
Apple Silicon
golden gate
tahoe
sequoia
sonoma
Linux ARM64
x86_64

Current versions:

stable 26.7.0

Other versions:

mysql@9.7 9.7.2 Open source relational database management system
mysql@8.4 8.4.11 Open source relational database management system
mysql@8.0 8.0.46 Open source relational database management system

Revision: 1

Depends on:

abseil 20260817.0 C++ Common Libraries
icu4c@78 78.3 C/C++ and Java libraries for Unicode and globalization
lz4 1.10.0 Extremely Fast Compression algorithm
openssl@3 3.6.4 Cryptography and SSL/TLS Toolkit
protobuf 36.1 Protocol buffers (Google's data interchange format)
zlib-ng-compat 2.3.3 Zlib replacement with optimizations for next generation systems
zstd 1.5.7 Zstandard is a real-time compression algorithm

Depends on when building from source:

bison 3.8.2 Parser generator
cmake 4.4.3 Cross-platform make
pkgconf 3.0.7 Package compiler and linker metadata toolkit

Uses from macOS: curl, cyrus-sasl, libedit

Conflicts with: mariadb (because both install the same binaries), percona-server (because both install the same binaries)

Binaries: comp_err, ibd2sdi, innochecksum, my_print_defaults, myisam_ftdump, myisamchk, myisamlog, myisampack, mysql, mysql.server, mysql_client_test, mysql_config, mysql_config_editor, mysql_keyring_encryption_test, mysql_migrate_keyring, mysql_secure_installation, mysql_test_event_tracking, mysql_tzinfo_to_sql, mysqladmin, mysqlbinlog, mysqlcheck, mysqld, mysqld_multi, mysqld_safe, mysqldump, mysqldumpslow, mysqlimport, mysqlrouter, mysqlrouter_bootstrap, mysqlrouter_keyring, mysqlrouter_mrs_client, mysqlrouter_passwd, mysqlrouter_plugin_info, mysqlshow, mysqlslap, mysqltest, mysqltest_safe_process, mysqlxtest, perror

Service:

Start now and at login: brew services start mysql
Run directly: $HOMEBREW_PREFIX/opt/mysql/bin/mysqld_safe --datadir=$HOMEBREW_PREFIX/var/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

Analytics:

30 days90 days365 days
Installs16,19852,274250,895
Installs (--HEAD)3378484
Installs on Request16,19452,226250,635
Installs on Request (--HEAD)3378484
Build Errors265