it-wiki:mysql:faq
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende Überarbeitung | |||
it-wiki:mysql:faq [2023/03/24 07:17] – [Find and Remove Unused Indexes] marko | it-wiki:mysql:faq [2023/03/24 07:18] (aktuell) – [Tips to reduce the size of MySQL Database] marko | ||
---|---|---|---|
Zeile 42: | Zeile 42: | ||
===== Tips to reduce the size of MySQL Database ===== | ===== Tips to reduce the size of MySQL Database ===== | ||
+ | ==== Backup, first but not least ==== | ||
+ | Best practices suggest to backup your database before take any dangerous action. MySQL and MariaDB include the mysqldump utility to simplify the process to create a backup of a database or system of databases. | ||
+ | <code bash> | ||
+ | # Backup Single DB | ||
+ | mysqldump -u [username] -p [databaseName] > [filename]-$(date +%F).sql | ||
+ | # Backup Entire DBMS | ||
+ | mysqldump --all-databases --single-transaction --quick --lock-tables=false > full-backup-$(date +%F).sql -u root -p | ||
+ | </ | ||
+ | |||
+ | If you are using MariaDB, you have the option of full or incremental backup via '' | ||
+ | <code bash> | ||
+ | $ mariabackup --backup --target-dir=/ | ||
+ | </ | ||
==== List MySQL Table and Index Size ==== | ==== List MySQL Table and Index Size ==== | ||
Use the following queries to monitor and evaluation table and index size. | Use the following queries to monitor and evaluation table and index size. |
it-wiki/mysql/faq.1679642242.txt.gz · Zuletzt geändert: von marko