June 19, 2013

Post: Be productive with the MySQL command line

…: mysql> pager grep sequence PAGER set to ‘grep sequencemysql> show engine innodb status\Gselect sleep(60);show engine innodb status\G Log sequence number … with -A Database changed mysql> select count(*) from sakila; ERROR 1146 (42S02): Table ‘sakila.sakila’ doesn’t exist mysql> select count(*) …

Post: Percona XtraDB Cluster reference architecture with HaProxy

sequence. Need state transfer. 120619 13:20:19 [Note] WSREP: Running: ‘wsrep_sst_xtrabackup ‘joiner’ ’10.195.206.117′ ” ‘/var/lib/mysql…-rel25.3 started; log sequence number 246661644 120619 13:21:19 [Note] Recovering after a crash using mysql-bin 120619 13:21…’s create a database and a userfor it. mysql> create database sbtest; Query OK, 1 row affected (0.01 sec) mysql> grant all on…

Post: Recovery deleted ibdata1

… for ibdconnect, but as long as MySQL isn’t restarted it is possible to recover database fast. Let me illustrate how. Let’s simulate the accident. For that I will delete /var/lib/mysql/ib… checkpoint age is zero, all pages are flushed: — LOG — Log sequence number 363096003 Log flushed up to 363096003 Last checkpoint at…

Post: InnoDB Full-text Search in MySQL 5.6 (part 1)

… in our database directory: -rw-rw—-. 1 mysql mysql 8632 Feb 20 15:54 dir_test_innodb.frm -rw-rw—-. 1 mysql mysql 213909504 Feb… defined for the underlying table, or it can be a sequence value generated by InnoDB when the table does not contain… unless you also do something to provide some sort of sequence value for that column, whether as an auto_increment value…

Comment: Stored Function to generate Sequences

[...] Stored Function to generate Sequences | MySQL Performance Blog – You could combine this with an INSERT trigger and get even more auto_increment like functionality. Tags: database mysql sequence [...]

Post: Evaluating IO subsystem performance for MySQL Needs

… the system. What I usually look for MySQL is performance in random reads and random … log writes, which are synchronous IO operation database performance which typically have rather close data … scale benchmarks. SysBench by default has repeatable sequence of requests, because it does not initialize …

Post: Edge-case behavior of INSERT...ODKU

…a customer issue wherein they were observing database performance that dropped through the floor (to…KEY(username) ) ENGINE=InnoDB; Now consider the following sequence of events. (root@localhost) [test]> INSERT INTO …be considered as being defined first. So, MySQL checks our INSERT, sees that the next…

Post: How to recover a single InnoDB table from a Full Backup

… InnoDB shared tablespace (ibdata) and the transaction IDs and log sequence numbers that are stored in the tablespace files also differ…: mysql> set FOREIGN_KEY_CHECKS=0; mysql> ALTER TABLE salaries DISCARD TABLESPACE; Copy the salaries.ibd files from the backup to the database data directory: # cp /tmp/2012-01-22_14-13-20/employees/salaries.ibd /var/lib/mysql/data/employees…

Post: SHOW INNODB STATUS walk through

… thread declared inside InnoDB 442 mysql tables in use 1, locked 0 MySQL thread id 8079, query …so such log sequences can’t be overwritten in log files. By monitoring log sequence number and value…16773888 Buffer pool size 262144 Free buffers 0 Database pages 258053 Modified db pages 37491 Pending …

Post: Lost innodb tables, xfs and binary grep

… about the system and how data was lost: MySQL had a dedicated partition on XFS file … all had same setting Developer accidentally ran DROP DATABASE X on the wrong machine (production master) All… Instead I had to grep for specific character sequences against all pages. Note however that only works…