# Install mysql with Homebrew, apk, chocolatey, apt, dnf, pacman, scoop, winget, zypper

Open source relational database management system. Version 9.7.1 via Homebrew; verified 2026-07-07.

## Install

```sh
sudo av install brew:mysql
```

## Agent safety answer

mysql provides client and server tooling that can read or mutate databases.

- **Credential access:** Reads database passwords, option files, client config, and environment credentials.
- **Remote mutation:** Can create, drop, alter, and export databases on reachable servers.
- **Publish/artifact risk:** Can dump or import data artifacts that may contain sensitive records.
- **Recommended control:** Gate destructive SQL, dumps, imports, and credential file access.
- **Agent-use guidance:** Allow schema inspection on safe targets; require approval for writes, dumps, and credential reads.

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install mysql
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add mysql
```

  Evidence: Alpine Linux edge package indexes: mysql from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install libmysql++-dev
```

  Evidence: Debian stable package indexes: libmysql++-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install mysql
```

  Evidence: Fedora Rawhide package metadata: mysql from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- pacman (92%):

```sh
sudo pacman -S mariadb
```

  Evidence: Arch Linux sync databases: mariadb from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install mariadb
```

  Evidence: openSUSE Tumbleweed package metadata: mariadb from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install mysql
```

  Evidence: Chocolatey community package catalog: mysql from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','ms-reportviewer2015'

- Scoop (92%):

```sh
scoop install main/mysql
```

  Evidence: Scoop official bucket manifest trees: bucket/mysql.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id Oracle.MySQL -e
```

  Evidence: Windows Package Manager source index: Oracle.MySQL from https://cdn.winget.microsoft.com/cache/source.msix

## Package facts

- **Package key:** brew:mysql
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/mysql>
- **Version:** 9.7.1
- **Source summary:** Open source relational database management system
- **Homepage:** <https://github.com/mysql/mysql-server>
- **Repository:** <https://github.com/mysql/mysql-server>
- **Upstream docs:** <https://dev.mysql.com/doc>
- **License:** GPL-2.0-only WITH Universal-FOSS-exception-1.0
- **Source archive:** <https://cdn.mysql.com/Downloads/MySQL-9.7/mysql-9.7.1.tar.gz>
- **Last updated:** 2026-07-07T02:23:24Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- comp_err (cli)
- ibd2sdi (cli)
- mysql_config_editor (cli)
- mysql_keyring_encryption_test (cli)
- mysql_migrate_keyring (cli)
- mysql_test_event_tracking (cli)
- mysqlrouter (cli)
- mysqlrouter_bootstrap (cli)
- mysqlrouter_keyring (cli)
- mysqlrouter_mrs_client (cli)
- mysqlrouter_passwd (cli)
- mysqlrouter_plugin_info (cli)
- mysqltest_safe_process (cli)
- mysqlxtest (cli)
- comp_err (alias)
- ibd2sdi (alias)
- mysql_config_editor (alias)
- mysql_keyring_encryption_test (alias)
- mysql_migrate_keyring (alias)
- mysql_test_event_tracking (alias)
- mysqlrouter (alias)
- mysqlrouter_bootstrap (alias)
- mysqlrouter_keyring (alias)
- mysqlrouter_mrs_client (alias)
- mysqlrouter_passwd (alias)
- mysqlrouter_plugin_info (alias)
- mysqltest_safe_process (alias)
- mysqlxtest (alias)

## Dependencies

- abseil
- icu4c@78
- lz4
- openssl@3
- protobuf
- zlib-ng-compat
- zstd

## Build dependencies

- bison
- cmake
- pkgconf

## Uses from macOS

- curl
- cyrus-sasl
- libedit

## Install behavior

- Post-install hook: not defined
- Service: declared
- 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
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 9.7.1
- Package-manager updated: 2026-07-07
- Local data: ok
- Upstream repository: https://github.com/mysql/mysql-server
- info: No cached GitHub release or tag data was available.
## Project history and usage

MySQL is an open-source relational database management system that grew out of work by Michael "Monty" Widenius, David Axmark, and Allan Larsson. Oracle's manual says the team first intended to use mSQL with its own ISAM routines, then built a new SQL interface after finding mSQL too slow or inflexible; the name comes from Widenius's daughter, My. MySQL AB was founded in Sweden in 1995, the project adopted GPL distribution in 2000, and Sun Microsystems acquired MySQL AB in 2008 before Oracle acquired Sun.

### Project history

The system became one of the defining databases of the LAMP stack: MySQL Server provides a multithreaded SQL server, client programs and libraries, administrative tools, and APIs, and it can be used as a client/server database or embedded library. Its ecosystem role was shaped by web deployment, dual licensing, and storage-engine evolution, including InnoDB's rise as the transactional backend. Oracle's customer pages list users across media, ecommerce, financial services, technology, telecom, education, and manufacturing, with named examples such as YouTube, GitHub, Uber, Square, BBC, Spotify, Airbus/EADS, Boeing, and the University of Toronto.

### How it is used

In package-manager terms, Homebrew's unversioned `mysql` formula follows the active upstream server line and installs the server plus common client and administrative programs such as `mysql`, `mysqld`, `mysqldump`, `mysqladmin`, and `mysql_secure_installation`. Homebrew also keeps versioned formulae such as `mysql@8.4` and `mysql@8.0`, and the main formula notes conflicts with MariaDB and Percona Server, reflecting MySQL's long-standing relationship with compatible forks and alternative server distributions.

### Sources

- <https://dev.mysql.com/doc/refman/8.4/en/history.html>
- <https://dev.mysql.com/doc/refman/8.4/en/what-is-mysql.html>
- <https://formulae.brew.sh/formula/mysql>
- <https://planet.mysql.com/entry/?id=23788>
- <https://www.mysql.com/customers/>


## Security Notes

broad file, network, media, or database tool signal. formula declares a Homebrew service.

- **Geiger risk:** orange / medium
- broad file, network, media, or database tool signal
- formula declares a Homebrew service


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.my.cnf

## Credential files

- Unix: ~/.my.cnf
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** mysql
- **Aliases:** mysql@9.7
- **Version Scheme:** 0
- **Revision:** 0
- **Conflicts With:** mariadb, percona-server
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - libmysql++-dev - 3.2.5-2.3+b1: normalized package name match | Debian stable package indexes: libmysql++-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | MySQL C++ library bindings (development) | https://tangentsoft.net/mysqlpp/
- Debian apt - libmysql++-doc - 3.2.5-2.3: normalized package name match | Debian stable package indexes: libmysql++-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | MySQL C++ library bindings (documentation and examples) | https://tangentsoft.net/mysqlpp/
- Debian apt - libmysql++3t64 - 3.2.5-2.3+b1: normalized package name match | Debian stable package indexes: libmysql++3t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | MySQL C++ library bindings (runtime) | https://tangentsoft.net/mysqlpp/
- Ubuntu apt - libmysql++-dev - 3.2.5-2.3: normalized package name match | Ubuntu 24.04 LTS package indexes: libmysql++-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | MySQL C++ library bindings (development) | https://tangentsoft.net/mysqlpp/
- Ubuntu apt - libmysql++-doc - 3.2.5-2.3: normalized package name match | Ubuntu 24.04 LTS package indexes: libmysql++-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | MySQL C++ library bindings (documentation and examples) | https://tangentsoft.net/mysqlpp/
- Ubuntu apt - libmysql++3t64 - 3.2.5-2.3: normalized package name match | Ubuntu 24.04 LTS package indexes: libmysql++3t64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | MySQL C++ library bindings (runtime) | https://tangentsoft.net/mysqlpp/
- apk - mysql - 11.8.8-r0: normalized package name match | Alpine Linux edge package indexes: mysql from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Dummy package for mysql migration | https://www.mariadb.org/
- dnf - mysql - 8.4.9-3.fc45: normalized package name match | Fedora Rawhide package metadata: mysql from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | MySQL client programs and shared libraries | http://www.mysql.com
- dnf - mysql++ - 3.3.0-12.fc44: normalized package name match | Fedora Rawhide package metadata: mysql++ from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | C++ wrapper for the MySQL C API | https://tangentsoft.com/mysqlpp/home
- dnf - mysql++-devel - 3.3.0-12.fc44: normalized package name match | Fedora Rawhide package metadata: mysql++-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | MySQL++ developer files (headers, examples, etc.) | https://tangentsoft.com/mysqlpp/home
- dnf - mysql++-manuals - 3.3.0-12.fc44: normalized package name match | Fedora Rawhide package metadata: mysql++-manuals from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | MySQL++ user and reference manuals | https://tangentsoft.com/mysqlpp/home
- pacman - mariadb - 12.3.2-2: normalized package name match | Arch Linux sync databases: mariadb from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Fast SQL database server, derived from MySQL | https://mariadb.org/
- pacman - mariadb-lts - 11.8.8-1: normalized package name match | Arch Linux sync databases: mariadb-lts from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Fast SQL database server, derived from MySQL (LTS) | https://mariadb.org/
- pacman - mysql++ - 3.3.0-2: normalized package name match | Arch Linux sync databases: mysql++ from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A C++ wrapper for MySQLs C API | http://tangentsoft.net/mysql++/
- zypper - mariadb - 11.8.8-1.1: normalized package name match | openSUSE Tumbleweed package metadata: mariadb from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Server part of MariaDB | https://www.mariadb.org
- Chocolatey - mysql: normalized package name match | Chocolatey community package catalog: mysql from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','ms-reportviewer2015'


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [lz4](https://www.automicvault.com/pkg/brew/lz4/) - Runtime dependency declared by Homebrew.
- [openssl@3](https://www.automicvault.com/pkg/brew/openssl-3/) - Runtime dependency declared by Homebrew.
- [protobuf](https://www.automicvault.com/pkg/brew/protobuf/) - Runtime dependency declared by Homebrew.
- [zstd](https://www.automicvault.com/pkg/brew/zstd/) - Runtime dependency declared by Homebrew.
- [bison](https://www.automicvault.com/pkg/brew/bison/) - Build dependency declared by Homebrew.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [mysql-client@8.0](https://www.automicvault.com/pkg/brew/mysql-client-8-0/) - Package name indicates the same formula family.
- [mysql@8.0](https://www.automicvault.com/pkg/brew/mysql-8-0/) - Package name indicates the same formula family.
- [mysql@8.4](https://www.automicvault.com/pkg/brew/mysql-8-4/) - Package name indicates the same formula family.
- [percona-server](https://www.automicvault.com/pkg/brew/percona-server/) - Shares av.db curated category or tags: cli, data, database, mysql, server.
- [lazysql](https://www.automicvault.com/pkg/brew/lazysql/) - Shares av.db curated category or tags: cli, data, database, mysql, sql.
- [mariadb](https://www.automicvault.com/pkg/brew/mariadb/) - Shares av.db curated category or tags: cli, data, database, server, sql.
- [monetdb](https://www.automicvault.com/pkg/brew/monetdb/) - Shares av.db curated category or tags: cli, data, database, rdbms, sql.
- [virtuoso](https://www.automicvault.com/pkg/brew/virtuoso/) - Shares av.db curated category or tags: cli, data, database, rdbms, sql.
- [automysqlbackup](https://www.automicvault.com/pkg/brew/automysqlbackup/) - Shares av.db curated category or tags: cli, data, database, mysql.
- [dolt](https://www.automicvault.com/pkg/brew/dolt/) - Shares av.db curated category or tags: cli, data, database, sql.
- [doltgres](https://www.automicvault.com/pkg/brew/doltgres/) - Shares av.db curated category or tags: cli, data, database, sql.

## Combined YAML source

View the package source record on GitHub. [combined/mysql.yml](https://github.com/automic-vault/db/blob/main/combined/mysql.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
- curated agent safety answer
