June 19, 2013

Post: Experiences with the McAfee MySQL Audit Plugin

… user activity in MySQL  has traditionally been challenging. Most data can be obtained from the slow or general log, but this involves…. If you also need to do this, the details are clearly explained here. The plugin writes its output in json format…/audit.sock #audit_json_socket=1 audit_json_log_file=/var/lib/mysql/audit.log audit_record_cmds=connect,Quit Notice the audit…

Post: Replication in MySQL 5.6: GTIDs benefits and limitations - Part 1

… problem. And some items in the documentation are not so clear. For instance: Do we really need to restart all the… and restart it: mysql> show slave status\G [...] Slave_IO_Running: No Slave_SQL_Running: Yes [...] The error log tells us why the… not on slave #2: # slave #1 mysql> change master to master_auto_position = 1; mysql> start slave; and let’s create a…

Post: MySQL 5.6 - InnoDB Memcached Plugin as a caching layer

… entire cache is cleared (think restarting a memcache node).  This is where a persistent cache can be invaluable. Enter MySQL 5.6… nutshell, here is how one would start the memcached plugin: mysql> install plugin daemon_memcached soname ‘libmemcached.so’; In an effort… fact that this is using InnoDB under the hood (redo logs, etc). Based on the above numbers, here are the relative…

Post: Virident vCache vs. FlashCache: Part 2

… vCache configuration, I think vCache can be declared the clear winner. Base MySQL & Benchmark Configuration All benchmarks were conducted with the following…­-time=7200 ­­–max­-requests=0 ­­–percentile=95 ­­\ –mysql­-user=root –mysql­-socket=/tmp/mysql.sock ­­–mysql­-table­-engine=innodb ­­\ –oltp­-read­-only=off run… = O_DIRECT innodb_log_buffer_size = 128M innodb_flush_log_at_trx_commit = 1 innodb_log_file_size = 1G innodb_log_files_in_group…

Post: Percona XtraDB Cluster (PXC): what about GRA_*.log files ?

log file: [root@node2 mysql]# ls GRA_*.log GRA_3_3.log [root@node2 mysql]# file GRA_3_3.log GRA_3_3.log: data [root@node2 mysql..._3.log GRA_3_3.log: data [root@node2 mysql]# file GRA_3_3-bin.log GRA_3_3-bin.log: MySQL replication log [root@node2 mysql]# mysqlbinlog… ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; So it’s clear that the problem…

Post: Using Flexviews - part two, change data capture

… name. The Binary Log is the MySQL log which records changes to tables in the database. FlexCDC reads the binary log to determine what… table: $ mysql -e ‘select * from flexviews.binlog_consumer_status\G’ -uroot *************************** 1. row *************************** server_id: 999 master_log_file: binary_log.000001 master_log_size… confusing it should be clear in a moment. Lets create a table, insert some rows, add a change log, delete rows and…

Post: Profiling MySQL Memory Usage With Valgrind Massif

… in my.cnf also) (see here if this is not clear) Now, before you run mysqld under Valgrind, make sure debug…,744B) 0x728DAA: Log_event::read_log_event(st_io_cache*, st_mysql_mutex*, Format_description_log_event const*) (in /usr/local/percona/mysql-5.5…,096B) 0x728DAA: Log_event::read_log_event(st_io_cache*, st_mysql_mutex*, Format_description_log_event const*) (in /usr/local/percona/mysql-5.5…

Post: Measuring the amount of writes in InnoDB redo logs

… different between the 2 methods. Even stranger, the innodb_os_log_written method consistently gave higher numbers than the LSN method… logs is a much more complicated process: every write is a 512-byte write and there can be overlapping writes. Not clear? Let’s look at an example when innodb_flush_log_at_trx_commit is set to…

Post: Figuring out what limits MySQL Replication

… check it based on slow query log, happily the server was running MySQL with slow query log with microsecond resolution so I could… of MySQL Logs. Too bad MySQL Binary log is the only one which it does not support natively. Happily it supports “raw” query log file… -v -i -P “^(SET|use|#)” > q1.log I’m not sure if this would clear everything but in my case it did…

Post: Logging Foreign Key errors

…. It’s not very clear where is the error. Let’s see the explanation with perror: # perror 150 MySQL error code 150… problem is. 4- Let’s check what the tool has logged: mysql> select * from test.foreign_key_errors\G *************************** 1. row *************************** ts: 2012… was: mysql> ALTER TABLE employees DROP PRIMARY KEY; Conclusion If you are having too many deadlock or foreign key errors log them…