Categories
Uncategorized

Bash – generate a random number of a given range

You can generate a random number in bash using this snippet:

RAND=$(shuf -i 7000-7999 -n 1)

Categories
Uncategorized

How to purge MySQL 8 binary logs

You saw, that your mysql disk, using /var/lib/mysql is full. So, you need to know how to free some space and clean up the disk. Usually, you can safely remove the old binlogs.