# 使用 Homebrew, apk, chocolatey, dnf, apt, pacman, scoop, winget, zypper 安装 mysql

查看 mysql 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

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

## 代理安全回答

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

- **凭据访问:** Reads database passwords, option files, client config, and environment credentials.
- **远程变更:** Can create, drop, alter, and export databases on reachable servers.
- **发布/制品风险:** Can dump or import data artifacts that may contain sensitive records.
- **推荐控制:** Gate destructive SQL, dumps, imports, and credential file access.
- **代理使用指南:** Allow schema inspection on safe targets; require approval for writes, dumps, and credential reads.

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mysql
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add mysql
```

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

- dnf (92%):

```sh
sudo dnf install mysql
```

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

- Debian apt (92%):

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

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

- pacman (92%):

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

  证据: 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
```

  证据: openSUSE Tumbleweed package metadata: mariadb from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install mysql
```

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

- Scoop (92%):

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

  证据: 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
```

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

## 软件包事实

- **软件包键:** brew:mysql
- **软件包管理器:** Homebrew
- **版本:** 9.7.1
- **来源摘要:** Open source relational database management system
- **主页:** <https://github.com/mysql/mysql-server>
- **最后更新:** 2026-07-31T08:47:03+01:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- 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 (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 9.7.1
## 项目历史与用法

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.

### 项目历史

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.

### 使用方式

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.

### 来源

- <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/>


## 安全说明

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

- **Geiger 风险:** orange / 中
- 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
## 其他软件包管理器记录

- 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 - 9.7.2-1.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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | MySQL client programs and shared libraries | http://www.mysql.com
- dnf - mysql++ - 3.3.0-13.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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | C++ wrapper for the MySQL C API | https://tangentsoft.com/mysqlpp/home
- dnf - mysql++-devel - 3.3.0-13.fc45: 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | MySQL++ developer files (headers, examples, etc.) | https://tangentsoft.com/mysqlpp/home
- dnf - mysql++-manuals - 3.3.0-13.fc45: 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | MySQL++ user and reference manuals | https://tangentsoft.com/mysqlpp/home
- pacman - mariadb - 12.3.2-4: 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-3: 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 - 12.3.2-1.3: normalized package name match | openSUSE Tumbleweed package metadata: mariadb from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-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','multipass'


## Combined YAML source

View the package source record on GitHub. [combined/mysql.yml](https://github.com/mxcl/pkgdb/blob/main/combined/mysql.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
- curated agent safety answer
