MySQL /etc/mysql/mysql.conf.d/mysqld.cnf

Original 📋 Debian 9 (Stretch) 33 Zeilen

Details

Größe
33 Zeilen
MD5
5e0569e12ba9af566f2a3db1c40d7b29
SHA256
02ad4536d09601cce66c6dda4650b5681062e72bf345ef6b13e78baa9e1994c8
/etc/mysql/mysql.conf.d/mysqld.cnf
# Copyright (c) 2014, 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  Server configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

[mysqld]
pid-file	= /var/run/mysqld/mysqld.pid
socket		= /var/run/mysqld/mysqld.sock
datadir		= /var/lib/mysql
log-error	= /var/log/mysql/error.log

Kopieren & Einfügen

curl:
curl https://exampleconfig.com/api/v1/config/original/5e0569e12ba9af566f2a3db1c40d7b29?hint=mysqld.cnf
wget:
wget -O mysqld.cnf https://exampleconfig.com/api/v1/config/original/5e0569e12ba9af566f2a3db1c40d7b29?hint=mysqld.cnf

Für KI-Agenten

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/5e0569e12ba9af566f2a3db1c40d7b29?hint=mysqld.cnf' /><config><app>MySQL</app><os>Debian 9 (Stretch)</os><location>/etc/mysql/mysql.conf.d/mysqld.cnf</location><lines>33</lines><md5>5e0569e12ba9af566f2a3db1c40d7b29</md5><sha256>02ad4536d09601cce66c6dda4650b5681062e72bf345ef6b13e78baa9e1994c8</sha256></config></prompt>

Füge es in Claude, ChatGPT oder einen anderen KI-Assistenten ein.

MySQL installieren

Debian

sudo apt update && sudo apt install mysql-server

Red Hat Enterprise Linux

sudo yum install mysql-server

Ubuntu

sudo apt update && sudo apt install mysql-server

Ablageort

Pfad
/etc/mysql/mysql.conf.d/mysqld.cnf
Verzeichnis
/etc/mysql/mysql.conf.d/
Bedeutung
Systemweites Konfig-Verzeichnis
Beschreibung
In /etc/ liegen systemweite Einstellungen, die alle Benutzer betreffen.

FAQ

Wann sollte ich mysqld.cnf verwenden?

Nutze sie, um eine fehlende Default-Datei wiederherzustellen, zu prüfen, was ausgeliefert wurde, oder sie gegen deine aktuelle MySQL-Config zu diffen.

Wie stelle ich die Defaults von MySQL wieder her?

Lad die Datei runter, sichere die aktuelle in /etc/mysql/mysql.conf.d/mysqld.cnf, ersetze sie und lade MySQL neu oder starte es neu.

Ist mysqld.cnf für den produktiven Einsatz geeignet?

Das ist der Hersteller-Default für Debian 9 (Stretch). Nimm sie als Basis und prüf Security- und Performance-Einstellungen, bevor du sie produktiv nutzt.

Wie unterscheidet sich das von anderen OS-Versionen?

Defaults variieren je nach Distro und Version. Diese Version passt zu Debian 9 (Stretch).

Kann ich das fürs Troubleshooting von MySQL nutzen?

Ja. Diff es gegen deine Version, finde Abweichungen und stell nur die Teile wieder her, die du brauchst.