Tag: mysql database

  • MySQL – Calculating Disk Usage Per Database

    MySQL – Calculating Disk Usage Per Database

    The answer usually lies within /var/lib/mysql/[DATABASE]. But the answer can also be found in, you guessed it, information_schema! 😀 Here’s an one-liner for you, that displays database sizes in megabytes (nice long float() included) If gigabytes are more your thing, run the following: Example output: Query on 👾

  • Kubernetes – Simple CronJob for MySQL/MariaDB Backup

    Kubernetes – Simple CronJob for MySQL/MariaDB Backup

    No Secret, No Configmap, No Fuzz. Just a command and args one-liner that gets the job done, day after day, with an invaluable result on the day that you reaaaally need it. Example Backup Cron: This will create a daily job (00:00, 12AM) that runs container image “mysqldump”, generously authored by docker.io/bigtruedata. It will store…