Wann sollte ich 50-mysqld_safe.cnf verwenden?
Nutze sie, um eine fehlende Default-Datei wiederherzustellen, zu prüfen, was ausgeliefert wurde, oder sie gegen deine aktuelle MariaDB-Config zu diffen.
# NOTE: This file is read only by the traditional SysV init script, not systemd. # MariaDB systemd does _not_ utilize mysqld_safe nor read this file. # # For similar behaviour, systemd users should create the following file: # /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf # # To achieve the same result as the default 50-mysqld_safe.cnf, please create # /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf # with the following contents: # # [Service] # User=mysql # StandardOutput=syslog # StandardError=syslog # SyslogFacility=daemon # SyslogLevel=err # SyslogIdentifier=mysqld # # For more information, please read https://mariadb.com/kb/en/mariadb/systemd/ # [mysqld_safe] # This will be passed to all mysql clients # It has been reported that passwords should be enclosed with ticks/quotes # especially if they contain "#" chars... # Remember to edit /etc/mysql/debian.cnf when changing the socket location. socket = /var/run/mysqld/mysqld.sock nice = 0 skip_log_error syslog
curl https://exampleconfig.com/api/v1/config/original/ace3390ea785e7bb3e87bee2ef0f9da8?hint=50-mysqld_safe.cnf
wget -O 50-mysqld_safe.cnf https://exampleconfig.com/api/v1/config/original/ace3390ea785e7bb3e87bee2ef0f9da8?hint=50-mysqld_safe.cnf
<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/ace3390ea785e7bb3e87bee2ef0f9da8?hint=50-mysqld_safe.cnf' /><config><app>MariaDB</app><os>Debian 9 (Stretch)</os><location>/etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf</location><lines>30</lines><md5>ace3390ea785e7bb3e87bee2ef0f9da8</md5><sha256>c294caa43f63dc6328ebf7c00edc12502a5604ca3775589f631b27d7a6e4acaa</sha256></config></prompt>
Füge es in Claude, ChatGPT oder einen anderen KI-Assistenten ein.
sudo apk add mariadb
sudo apt update && sudo apt install mariadb-server
sudo yum install mariadb-server
sudo apt update && sudo apt install mariadb-server
Wann sollte ich 50-mysqld_safe.cnf verwenden?
Nutze sie, um eine fehlende Default-Datei wiederherzustellen, zu prüfen, was ausgeliefert wurde, oder sie gegen deine aktuelle MariaDB-Config zu diffen.
Wie stelle ich die Defaults von MariaDB wieder her?
Lad die Datei runter, sichere die aktuelle in /etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf, ersetze sie und lade MariaDB neu oder starte es neu.
Ist 50-mysqld_safe.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 MariaDB nutzen?
Ja. Diff es gegen deine Version, finde Abweichungen und stell nur die Teile wieder her, die du brauchst.