MariaDB /etc/mysql/debian.cnf

Original 📋 Debian 11 (Bullseye) 14 lines

Works On

Viewing:
Debian 11 (Bullseye)
Same on:
Debian 12 (Bookworm) Debian 13 (Trixie) Ubuntu 22.04 LTS (Jammy Jellyfish) Ubuntu 24.04 LTS (Noble Numbat)
Other versions:

Details

Size
14 lines
MD5
df477b524b3adfdcc5f765ebfa17a6e7
SHA256
18b2e9f179dabe8762a77b297f803c958a3ed9642aaa5ba184e8d56bc1cfda9a
/etc/mysql/debian.cnf
# THIS FILE IS OBSOLETE. STOP USING IT IF POSSIBLE.
# This file exists only for backwards compatibility for
# tools that run '--defaults-file=/etc/mysql/debian.cnf'
# and have root level access to the local filesystem.
# With those permissions one can run 'mariadb' directly
# anyway thanks to unix socket authentication and hence
# this file is useless. See package README for more info.
[client]
host     = localhost
user     = root
[mysql_upgrade]
host     = localhost
user     = root
# THIS FILE WILL BE REMOVED IN A FUTURE DEBIAN RELEASE.

Copy & Paste

curl:
curl https://exampleconfig.com/api/v1/config/original/df477b524b3adfdcc5f765ebfa17a6e7?hint=debian.cnf
wget:
wget -O debian.cnf https://exampleconfig.com/api/v1/config/original/df477b524b3adfdcc5f765ebfa17a6e7?hint=debian.cnf

For AI Agents

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/df477b524b3adfdcc5f765ebfa17a6e7?hint=debian.cnf' /><config><app>MariaDB</app><os>Debian 11 (Bullseye)</os><location>/etc/mysql/debian.cnf</location><lines>14</lines><md5>df477b524b3adfdcc5f765ebfa17a6e7</md5><sha256>18b2e9f179dabe8762a77b297f803c958a3ed9642aaa5ba184e8d56bc1cfda9a</sha256></config></prompt>

Paste into Claude, ChatGPT, or any AI assistant.

Install MariaDB

Alpine Linux

sudo apk add mariadb

Debian

sudo apt update && sudo apt install mariadb-server

Red Hat Enterprise Linux

sudo yum install mariadb-server

Ubuntu

sudo apt update && sudo apt install mariadb-server

File Location

File Path
/etc/mysql/debian.cnf
Directory
/etc/mysql/
Significance
System-wide configuration directory
Description
Files in /etc/ contain system-wide configuration settings that affect all users.

FAQ

When should I use this debian.cnf?

Use it to restore a missing default, confirm what shipped, or diff against your current MariaDB config.

How do I restore MariaDB defaults?

Download the file, back up the current one in /etc/mysql/debian.cnf, replace it, then reload or restart MariaDB.

Is debian.cnf safe for production?

It is the vendor default for Debian 11 (Bullseye). Treat it as a baseline and review security and performance settings before production use.

How does this differ from other OS versions?

Defaults vary by distro and version. This copy matches Debian 11 (Bullseye).

Can I use this for MariaDB troubleshooting?

Yes. Diff it against yours to find drift, then restore only the sections you need.