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
MySQL Tidbits June 27, 2011 Allow Slave to connect master: C:\mysql>create user 'replica'@'192.168.0.110' identified by '<YOUR PASSWORD>'; NOTE: 192.168.0.110 which is the SLAVE machine‟s address. i. mysql>grant create,insert,select,update,delete on ejbca.* to 'replica'@'192.168.0.110'; Checking if Slave can connect to Master: C:\>mysql –u replica –h 192.168.0.100 –p C:\>Enter password: <YOUR VALUES> NOTE: If the mysql prompt opens then the Master… Read More
How to install Java SDK (1.6) and Apache Ant (1.7) on CentOS November 18, 2011November 18, 2011 I had enough with some package managers or alternative ways of installing Java on a server which is running CentOS (RHEL) 4.4 . I think the most straight forward way is the following. I promise by the end of this post you will have Java and Apache Ant running on… Read More
Nextcloud Upgrade Issue via Web January 5, 2024January 5, 2024 My Nextcloud update via web was constantly failing. So looked for alternate CLI methods. Method#1 Using occ cli sudo -u www-data php ./occ upgrade Nextcloud or one of the apps require upgrade – only a limited number of commands are available You may use your browser or the occ upgrade… Read More