MariaDB /etc/mysql/conf.d/mysql.cnf

Original 📋 Debian 9 (Stretch) 29 lines

Details

Size
29 lines
MD5
a57fde3ea8bb8a3e78ec9eaa727580c6
SHA256
ae11b8632c16d24e932cb86f5ed6d104a7cf6011e61b9f2a35acc8b05b04070c
/etc/mysql/conf.d/mysql.cnf
# Copyright (c) 2015, 2021, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
# as published by the Free Software Foundation.
#
# This program is also distributed with certain software (including
# but not limited to OpenSSL) that is licensed under separate terms,
# as designated in a particular file or component or in included license
# documentation.  The authors of MySQL hereby grant you an additional
# permission to link the program and your derivative works with the
# separately licensed software that they have included with MySQL.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License, version 2.0, for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA

#
# The MySQL  Client configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

[mysql]

Copy & Paste

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

For AI Agents

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/a57fde3ea8bb8a3e78ec9eaa727580c6?hint=mysql.cnf' /><config><app>MariaDB</app><os>Debian 9 (Stretch)</os><location>/etc/mysql/conf.d/mysql.cnf</location><lines>29</lines><md5>a57fde3ea8bb8a3e78ec9eaa727580c6</md5><sha256>ae11b8632c16d24e932cb86f5ed6d104a7cf6011e61b9f2a35acc8b05b04070c</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/conf.d/mysql.cnf
Directory
/etc/mysql/conf.d/
Significance
System-wide configuration directory
Description
Files in /etc/ contain system-wide configuration settings that affect all users.

FAQ

When should I use this mysql.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/conf.d/mysql.cnf, replace it, then reload or restart MariaDB.

Is mysql.cnf safe for production?

It is the vendor default for Debian 9 (Stretch). 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 9 (Stretch).

Can I use this for MariaDB troubleshooting?

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