sudo mkdir -p '/etc/my.cnf.d' && sudo -e '/etc/my.cnf.d/custom.cnf'
[client] default-character-set = 'utf8mb4' [mariadb-client] default-character-set = 'utf8mb4' [mariadbd] character-set-client-handshake = 'FALSE' character-set-server = 'utf8mb4' collation-server = 'utf8mb4_unicode_ci' init-connect='SET NAMES utf8mb4' expire_logs_days = '7' max_binlog_size = '100M' skip-networking = 'On' table_definition_cache = '1400'
sudo mariadb-admin variables | egrep 'utf8|networking|socket'
sudo dnf install 'mariadb-server'
sudo systemctl enable 'mariadb' --now && sudo mariadb-secure-installation
sudo mariadb-check --optimize --all-databases --force --extended --auto-repair
sudo mariadb
CREATE USER 'maintenance'@'localhost' IDENTIFIED BY 'x';
GRANT SELECT, INSERT ON *.* to 'maintenance'@'localhost';
FLUSH PRIVILEGES;
EXIT
sudo mkdir -p '/var/lib/mysql/auth' && sudo -e '/var/lib/mysql/auth/maintenance' && sudo chown -v -R 'mysql':'mysql' '/var/lib/mysql/auth' && sudo chmod -v '600' '/var/lib/mysql/auth/maintenance' && sync
[mariadb-check] user=maintenance password=x
sudo -e '/etc/systemd/system/db-m.service'
[Service] User=mysql Group=mysql Type=oneshot ExecStart='/usr/bin/mariadb-check' --defaults-extra-file='/var/lib/mysql/auth/maintenance' --optimize --all-databases --force --extended --auto-repair ExecStartPost='/usr/bin/sync'
sudo -e '/etc/systemd/system/db-m.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'db-m.timer' --now && sudo systemctl start 'db-m' && sudo systemctl status 'db-m' -l
[Unit] Description=MariaDB Database Check, Repair, and Optimization After=mariadb.service [Timer] OnCalendar=weekly Persistent=true [Install] WantedBy=timers.target
select User,Host from mysql.user;
/var/lib/mysql/mysql.sock
localhost
game servers