Delete/Purging mysql-bin (binlog) files safely Rumi, January 7, 2021 The file mysql-bin.index keeps a list of all binary logs mysqld has generated and auto-rotated. The mechanisms for cleaning out the binlogs in conjunction with mysql-bin.index are: PURGE BINARY LOGS TO ‘binlogname’; PURGE BINARY LOGS BEFORE ‘datetimestamp’; These will clear all binary logs before the binlog or timestamp you just specified. For example, if you login to mysql run mysql> PURGE BINARY LOGS TO ‘mysql-bin.000223’; this will erase all binary logs before ‘mysql-bin.000223’. If you run mysql> PURGE BINARY LOGS BEFORE DATE(NOW() – INTERVAL 3 DAY) + INTERVAL 0 SECOND; this will erase all binary logs before midnight 3 days ago. If you want to have binlog rotated away automatically and keep 3 days woth, simply set this: mysql> SET GLOBAL expire_logs_days = 3; then add this to /etc/my.cnf [mysqld] expire-logs-days=3 Related Administrations MySQL BinlogMySQL
Debian 8 (Jessie) repo updated-2023 August 23, 2023 This worked for Debian 8 (Jessie) replace original /etc/sources.list with: deb http://archive.debian.org/debian/ jessie main non-free contrib deb-src http://archive.debian.org/debian/ jessie main non-free contrib deb http://archive.debian.org/debian-security/ jessie/updates main non-free contrib deb-src http://archive.debian.org/debian-security/ jessie/updates main non-free contribapt-update It will give a keyring error. I tried both: Related Read More
osTicket Automated Install Script December 13, 2021 osTicket is one of the leading open source ticketing systems. Here’s an easy way to spin up an instance on Ubuntu. Note: This script is purely intended for use in short-lived demo systems. The passwords are obvious (password !?) and there is no hardening applied to any of this system…. Read More
MySQL Cheat Sheet February 1, 2012 Selecting a database: mysql> USE database; Listing databases: mysql> SHOW DATABASES; Listing tables in a db: mysql> SHOW TABLES; Describing the format of a table: mysql> DESCRIBE table; Creating a database: mysql> CREATE DATABASE db_name; Creating a table: mysql> CREATE TABLE table_name (field1_name TYPE(SIZE), field2_name TYPE(SIZE)); Ex: mysql> CREATE TABLE… Read More