MariaDB: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Geist (Diskussion | Beiträge) |
Geist (Diskussion | Beiträge) |
||
Zeile 8: | Zeile 8: | ||
$ dnf -y install mariadb-backup | $ dnf -y install mariadb-backup | ||
$ mariabackup --backup --target-dir /home/backup -u root -p password | $ mariabackup --backup --target-dir /home/backup -u root -p password | ||
+ | |||
+ | ===== Find config files ===== | ||
+ | $ '''find / -name my.cnf''' | ||
+ | $ '''mysqld --help --verbose''' | ||
+ | Default options are read from the following files in the given order: | ||
+ | /etc/my.cnf | ||
+ | /etc/mysql/my.cnf | ||
+ | /usr/etc/my.cnf | ||
+ | ~/.my.cnf | ||
===== SYSTEMCTL MARIADB ===== | ===== SYSTEMCTL MARIADB ===== |
Version vom 15. Juni 2022, 11:26 Uhr
Inhaltsverzeichnis
EASY BACKUP
1. $ mysqldump -u root -p –all-databases > db.sql $ mysql -u root -p db < db.sql $ du -sh db.sql
2. $ dnf -y install mariadb-backup $ mariabackup --backup --target-dir /home/backup -u root -p password
Find config files
$ find / -name my.cnf $ mysqld --help --verbose Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf
SYSTEMCTL MARIADB
$ systemctl stop mariadb $ systemctl start mariadb $ systemctl restart mariadb
INIT SECURE DB
$ mysql_secure_installation
CREATE NEW USER|GRANT ALL PRIVILEGES
mysql> CREATE USER 'newuser'@'%' IDENTIFIED BY 'password'; mysql> CREATE USER 'newuser'@'[IP|DOMAIN]' IDENTIFIED BY 'password'; mysql> CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; mysql> FLUSH PRIVILEGES;