June 19, 2013

Post: Disconnecting a replication slave is easier with MySQL 5.5+ (RESET SLAVE vs. RESET SLAVE ALL)

… the master position has been deleted, replication will restart at the beginning of the first available binary log, which is very likely to… binary log file, with all the nasty consequences we can imagine. Even worse, the CHANGE MASTER TO MASTER_HOST=” trick no longer works: mysql

Post: Backing up binary log files with mysqlbinlog

… of the binary log files which could still lead to data loss depending on the interval you back them up. Recently in MySQL 5… addition that supports connecting to remote MySQL instances and dumping binary log data to local disks ( http://dev.mysql.com/doc/refman/5.6… running. By default if you do not supply the binary log file, mysqlbinlog deletes and overwrites them all that is undesired behaviour in our…

Post: Binary log file size matters (sometimes)

mysql mysql 1073742566 Nov 3 08:35 /var/lib/mysqllogs/db1-bin-log.003234 What is happening here? Apparently, every time current binary log gets… binary log removal and if your file system is slow at deleting files (both customers systems ran on ext3, which can be very slow deleting large files

Post: Faster Point In Time Recovery with LVM2 Snaphots and Binary Logs

mysql> show binary logs; +——————+———–+ | Log_name | File_size | +——————+———–+ … | mysql-bin.000022 | 336797725 | | mysql-bin.000023 | 107 | +——————+———–+ 23 rows in set (0.00 sec) mysql

Post: Filling the tmp partition with persistent connections

…’re running a typical master-slave replication with ROW based binary log file. The application connects to the database using persistent connection technique… /tmp/ML4VPBxK (deleted) mysqld 6112 root 62u REG 7,0 62390272 26 /tmp/ML19sFCA (deleted) There are lot of files in deleted status that…, INSERT or LOAD DATA INFILE MySQL send the rows to the Binary Log Cache before writing it to the Binary Log Files. If that cache is…

Post: Why audit logging with triggers in MySQL is bad for replication

…to quickly parse the binary log files, extracting the relevant statements. mysqlbinlog bin_log.000001 | mysqlsla -lt binary – Check out …*************************** 2. row *************************** trigger_name: Foo_Delete event_object_table: Foo Event_Manipulation: DELETE So whats the problem with…

Post: MySQL Server Variables - SQL layer or Storage Engine specific.

… for in memory tables. So first MySQL versions did not bother naming variables…delete binary logs from master. It does not affect Innodb and other storage engines transaction logs, slow query log or general log…, ft_query_expansion_limit, ft_stopword_file FullText search related variables. As FullText…

Post: How would you compress your MySQL Backup

… note the serious leap in compressed file size. Though in this example we used MySQL binary log file which often contains plenty of similar events… which makes it easy drop in replacement. I got LZOP binary which was built against LZO 1.0, more resent version… I delete this particular file. BZIP compression for this file took 298 seconds which is just 3.4 MB/sec though compressed file was…

Post: Using Flexviews - part two, change data capture

mysql -e ‘select * from flexviews.binlog_consumer_status\G’ -uroot *************************** 1. row *************************** server_id: 999 master_log_file: binary_log.000001 master_log_size: 214652 exec_master_log…Warnings: 0 And delete data in a second transaction: mysql> delete from test.demo…

Post: How to recover deleted rows from an InnoDB Tablespace

MySQL, take a copy of the salaries.ibd and start it again. Later, we’ll extract those deleted rows from the ibd file… with tables and indexes (with their IDs) to the error log. mysql (employees) > CREATE TABLE innodb_table_monitor (id int) ENGINE=InnoDB… also from an ibd file if you have a binary backup. Just use constraint_parser without the -D option (deleted) and you will…