# 使用 Homebrew, apk, dnf, Nix, pacman, zypper 安装 mariadb-connector-c

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

## 安装

```sh
sudo av install brew:mariadb-connector-c
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mariadb-connector-c
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add mariadb-connector-c
```

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

- dnf (92%):

```sh
sudo dnf install mariadb-connector-c
```

  证据: Fedora Rawhide package metadata: mariadb-connector-c from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#mariadb-connector-c
```

  证据: nixpkgs package indexes: mariadb-connector-c from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

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

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

- zypper (92%):

```sh
sudo zypper install libmariadb-devel
```

  证据: openSUSE Tumbleweed package metadata: libmariadb-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## 软件包事实

- **软件包键:** brew:mariadb-connector-c
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/mariadb-connector-c>
- **版本:** 3.4.9
- **来源摘要:** MariaDB database connector for C applications
- **主页:** <https://mariadb.org/download/?tab=connector&prod=connector-c>
- **仓库:** <https://github.com/mariadb-corporation/mariadb-connector-c>
- **上游文档:** <https://mariadb.com/docs/connectors/mariadb-connector-c>
- **许可证:** LGPL-2.1-or-later
- **源码归档:** <https://archive.mariadb.org/connector-c-3.4.9/mariadb-connector-c-3.4.9-src.tar.gz>
- **最后更新:** 2026-06-11T10:47:01Z
- **已生成:** 2026-07-10T07:20:53+00:00

## 可执行文件

- mysql_config (cli)
- mysql_config (别名)

## 依赖

- openssl@3
- zstd

## 构建依赖

- cmake

## macOS 提供的库

- curl
- krb5

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-10
- 管理器版本: 3.4.9
- 管理器更新时间: 2026-06-11
- 本地数据: OK
- 上游仓库: https://mariadb.org/download/?tab=connector&prod=connector-c
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

MariaDB Connector/C is the C client library for applications that connect to MariaDB and MySQL-compatible servers. In package-manager terms it is the small but important client-side piece that many native programs need at build time or runtime, especially when replacing Oracle MySQL client libraries with MariaDB's LGPL client stack.

### 项目历史

The connector descends from the MariaDB Client Library for C and was later branded as MariaDB Connector/C. MariaDB's own release notes describe Connector/C 3.0.0 in January 2016 as an alpha of the renamed client library, while the 2.3 series remained a stable GA line in 2016. The project is maintained separately from the server tree at the official MariaDB Corporation GitHub repository.

MariaDB documents Connector/C as the library used to connect C and C++ applications to MariaDB and MySQL databases, under the LGPLv2.1 license. That licensing and source split made it attractive to distributions and build systems that wanted a client library without depending on a full server installation.

### 采用历史

Connector/C spread through operating-system packaging because many database-aware programs need headers, mariadb_config or mysql_config compatibility, and libmariadb at compile or link time. MariaDB's Debian 10 announcement notes that Debian shipped MariaDB 10.3 with Connector/C 3.0 and that packages formerly depending on legacy MySQL/MariaDB client libraries moved to libmariadb3 from LGPL-licensed Connector/C.

For Homebrew users, the separate mariadb-connector-c formula is useful when a package needs the C client library and build metadata but not a local MariaDB server. It also provides mysql_config compatibility for software that still expects MySQL-flavored discovery commands.

### 使用方式

Typical use is indirect: install the package, let build tools find mariadb_config or mysql_config, and link software against libmariadb. Application developers can also use Connector/C's option-file support so clients read the same my.cnf-style defaults as other MariaDB and MySQL command-line clients.

Because Connector/C can read default or custom option files, package users should treat my.cnf locations as both configuration and possible credential locations when client option groups contain user, password, TLS key, or passphrase settings.

### 为什么软件包爱好者会关心

Package maintainers care about Connector/C because it decouples client-library packaging from the database server and preserves MySQL C API compatibility names. It is the package that often fixes builds of database clients, language bindings, monitoring tools, and older autotools projects looking for mysql_config.

The Homebrew formula is especially convenient on developer workstations: it gives native builds a MariaDB/MySQL-compatible client library without starting a daemon or pulling in server administration tools.

### 时间线

- 2015: Connector/C 2.2.1 was documented as a stable GA release of the MariaDB Client Library for C.
- 2016: Connector/C 3.0.0 appeared as an alpha of the renamed MariaDB Connector/C.
- 2016: Connector/C 2.3.0 was a stable GA release of the client library.
- 2017: Connector/C 3.0.2 reached stable GA status.
- 2019: Debian 10 shipped MariaDB 10.3 with MariaDB Connector/C 3.0 and libmariadb3.
- 2026: MariaDB Connector/C 3.4.9 release notes document the continuing stable 3.4 series.

### Related projects

- MariaDB Server is the database server most closely associated with Connector/C.
- MySQL-compatible applications and language bindings often use Connector/C through libmariadb or mysql_config-compatible discovery.
- MariaDB Connector/J, Connector/ODBC, and Connector/C++ are sibling connector projects for other client APIs.

### 来源

- <https://github.com/mariadb-corporation/mariadb-connector-c>
- <https://mariadb.com/docs/connectors/mariadb-connector-c>
- <https://mariadb.com/docs/connectors/mariadb-connector-c/building-connectorc-from-source>
- <https://mariadb.com/docs/connectors/mariadb-connector-c/configuring-mariadb-connectorc-with-option-files>
- <https://mariadb.com/docs/connectors/mariadb-connector-c/mariadb-connector-c-guide>
- <https://mariadb.com/docs/release-notes/connectors/c/2.3/2.3.0>
- <https://mariadb.com/docs/release-notes/connectors/c/3.0/3.0.0>
- <https://mariadb.org/debian-10-mariadb-10-3/>


## 安全说明

没有找到 mariadb-connector-c 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## 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: /etc/my.cnf, /etc/mysql/my.cnf, $MARIADB_HOME/my.cnf, $MYSQL_HOME/my.cnf, ~/.my.cnf
- Windows: System Windows Directory\my.ini, System Windows Directory\my.cnf, Windows Directory\my.ini, Windows Directory\my.cnf, C:\my.ini, C:\my.cnf, installdir\my.ini, installdir\my.cnf, installdir\data\my.ini, installdir\data\my.cnf, %MARIADB_HOME%\my.ini, %MARIADB_HOME%\my.cnf, %MYSQL_HOME%\my.ini, %MYSQL_HOME%\my.cnf

## Credential files

- Unix: /etc/my.cnf, /etc/mysql/my.cnf, $MARIADB_HOME/my.cnf, $MYSQL_HOME/my.cnf, ~/.my.cnf
- Windows: System Windows Directory\my.ini, System Windows Directory\my.cnf, Windows Directory\my.ini, Windows Directory\my.cnf, C:\my.ini, C:\my.cnf, installdir\my.ini, installdir\my.cnf, installdir\data\my.ini, installdir\data\my.cnf, %MARIADB_HOME%\my.ini, %MARIADB_HOME%\my.cnf, %MYSQL_HOME%\my.ini, %MYSQL_HOME%\my.cnf
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** mariadb-connector-c
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** yes
- **URL Keys:** head, stable

## 其他软件包管理器记录

- Nix - mariadb-connector-c: normalized package name match | nixpkgs package indexes: mariadb-connector-c from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- apk - mariadb-connector-c - 3.4.6-r0: normalized package name match | Alpine Linux edge package indexes: mariadb-connector-c from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The MariaDB Native Client library (C driver) | https://mariadb.org/
- apk - mariadb-connector-c-dev - 3.4.6-r0: normalized package name match | Alpine Linux edge package indexes: mariadb-connector-c-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The MariaDB Native Client library (C driver) (development files) | https://mariadb.org/
- dnf - mariadb-connector-c - 3.4.8-3.fc44: normalized package name match | Fedora Rawhide package metadata: mariadb-connector-c from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | The MariaDB Native Client library (C driver) | http://mariadb.org/
- dnf - mariadb-connector-c-config - 3.4.8-3.fc44: normalized package name match | Fedora Rawhide package metadata: mariadb-connector-c-config from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Configuration files for packages that use /etc/my.cnf as a configuration file | http://mariadb.org/
- dnf - mariadb-connector-c-devel - 3.4.8-3.fc44: normalized package name match | Fedora Rawhide package metadata: mariadb-connector-c-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for mariadb-connector-c | http://mariadb.org/
- dnf - mariadb-connector-c-doc - 3.4.8-3.fc44: normalized package name match | Fedora Rawhide package metadata: mariadb-connector-c-doc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Manual pages documenting API of the libmariadb.so library | http://mariadb.org/
- dnf - mariadb-connector-c-test - 3.4.8-3.fc44: normalized package name match | Fedora Rawhide package metadata: mariadb-connector-c-test from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Testsuite files for mariadb-connector-c | http://mariadb.org/
- pacman - mariadb-libs - 12.3.2-2: normalized package name match | Arch Linux sync databases: mariadb-libs from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | MariaDB libraries | https://mariadb.org/
- pacman - mariadb-lts-libs - 11.8.8-1: normalized package name match | Arch Linux sync databases: mariadb-lts-libs from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | MariaDB libraries (LTS) | https://mariadb.org/
- zypper - libmariadb-devel - 3.4.8-1.1: normalized package name match | openSUSE Tumbleweed package metadata: libmariadb-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Development files for the MariaDB Connector C API | https://github.com/MariaDB/mariadb-connector-c
- zypper - libmariadb3 - 3.4.8-1.1: normalized package name match | openSUSE Tumbleweed package metadata: libmariadb3 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | MariaDB connector in C | https://github.com/MariaDB/mariadb-connector-c
- zypper - libmariadb3-32bit - 3.4.8-1.1: normalized package name match | openSUSE Tumbleweed package metadata: libmariadb3-32bit from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | MariaDB connector in C | https://github.com/MariaDB/mariadb-connector-c
- zypper - libmariadb_plugins - 3.4.8-1.1: normalized package name match | openSUSE Tumbleweed package metadata: libmariadb_plugins from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Plugins for the MariaDB C Connector | https://github.com/MariaDB/mariadb-connector-c
- zypper - libmariadbprivate - 3.4.8-1.1: normalized package name match | openSUSE Tumbleweed package metadata: libmariadbprivate from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Additional internal libraries for the MariaDB C Connector | https://github.com/MariaDB/mariadb-connector-c


## 相关链接

- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Database and data packages](https://www.automicvault.com/zh-hans/pkg/database-data-tools/) - Matched database, SQL, migration, or data-store metadata.
- [openssl@3](https://www.automicvault.com/zh-hans/pkg/brew/openssl-3/) - Runtime dependency declared by Homebrew.
- [zstd](https://www.automicvault.com/zh-hans/pkg/brew/zstd/) - Runtime dependency declared by Homebrew.
- [cmake](https://www.automicvault.com/zh-hans/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [diesel](https://www.automicvault.com/zh-hans/pkg/brew/diesel/) - Popular package that depends on this formula.
- [hydra](https://www.automicvault.com/zh-hans/pkg/brew/hydra/) - Popular package that depends on this formula.
- [inspircd](https://www.automicvault.com/zh-hans/pkg/brew/inspircd/) - Popular package that depends on this formula.
- [kitchen-sync](https://www.automicvault.com/zh-hans/pkg/brew/kitchen-sync/) - Popular package that depends on this formula.
- [manticoresearch](https://www.automicvault.com/zh-hans/pkg/brew/manticoresearch/) - Popular package that depends on this formula.
- [mariadb](https://www.automicvault.com/zh-hans/pkg/brew/mariadb/) - Package names and metadata indicate a similar tool family. Shared terms: config, database, mariadb, mysql, openssl.
- [mariadb@11.8](https://www.automicvault.com/zh-hans/pkg/brew/mariadb-11-8/) - Package names and metadata indicate a similar tool family. Shared terms: config, mariadb, mysql, openssl, openssl-3.
- [mariadb@10.11](https://www.automicvault.com/zh-hans/pkg/brew/mariadb-10-11/) - Package names and metadata indicate a similar tool family. Shared terms: mariadb, mysql, openssl, openssl-3, zstd.

## Combined YAML source

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


## 来源

- Nucleus package database
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
