Showing entries 91 to 100 of 1008
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: Uncategorized (reset)
MySQL Binlog Events Use case and Examples

This is in continuation to the previous post, if you have not read that, I would advise you to go through that before continue reading.
I discussed about three use cases in my last post, here I will explain them in detail.

  1.  Extracting data from a binary log file:
    The binary log file is full of information, but what if you want selected info, for example:
    • printing the timestamp for every event in the binary log file.
    • extracting the event types of all the events occurring in the binary log file.

    And any other such data from an event in real time. Below is some sample code which shows how to do that step by step.

    • Connect to the available transport
      // …
[Read more]
MySQL Binlog Events – reading and handling information from your Binary Log

MySQL replication is among the top features of MySQL. In replication data is replicated from one MySQL Server (also knows as Master) to another MySQL Server(also known as Slave). MySQL Binlog Events is a set of libraries which work on top of replication and open directions for myriad of use cases like extracting data from binary log files, building application to support heterogeneous replication, filtering events from binary log files and much more.
All this in  REAL TIME .
INTRODUCTION
I have already defined what MySQL Binlog Events is, to deliver on any of the above use-cases, you first need to read the event from the binary log. This can be done using two types of transports:

1) TCP transport: Here your application will connect to an online MySQL Server and receive events as and when they occur.

2) File transport: As the name suggests the application will connect to an …

[Read more]
Feedback directed optimization with GCC and Perf


Gcc 5.0 has added support for FDO which uses perf to generate profile. There is documentation for this in gcc manual, to quote:

-fauto-profile=path
Enable sampling-based feedback-directed optimizations, and the following optimizations which are generally profitable only with profile feedback available: -fbranch-probabilities, -fvpt, -funroll-loops, -fpeel-loops, -ftracer, -ftree-vectorize,
-finline-functions, -fipa-cp, -fipa-cp-clone, -fpredictive-commoning, -funswitch-loops, -fgcse-after-reload, and -ftree-loop-distribute-patterns.
path is the name of a file containing AutoFDO profile information. If omitted, it defaults to fbdata.afdo in the current directory.
Producing an AutoFDO …

[Read more]
Slides from the MySQL Session at Great Indian developer Summit 2015

Wanted to send a pointer to the slides from my session at #GIDS 2015.

Will followup with an impressions blog soon.

My sql5.7 whatsnew_presentedatgids2015 from Sanjay Manwani

MySQL Enterprise Edition Database Firewall – Control and Monitor SQL Statement Executions

As of MySQL 5.6.24, MySQL Enterprise Edition includes MySQL Enterprise Firewall, an application-level firewall (it runs within the mysql database process) that enables database administrators to permit or deny SQL statement execution based on matching against whitelists of accepted statement patterns. This helps harden MySQL Server against attacks such as SQL injection or attempts to exploit applications by using them outside of their legitimate query workload characteristics.

Each MySQL account registered with the firewall has its own whitelist of statement patterns (a tokenized representation of a SQL statement), enabling protection to be tailored per account. For a given account, the firewall can operate in recording or protecting mode, for training in the accepted statement …

[Read more]
pt-query-digest common usage scenarios

 

1) To find slow queries

pt-query-digest /var/lib/mysql/cloud-server-01-slow.log > slowqueroutput.log

2) Between a particular time range

pt-query-digest –since ’2015-04-10 00:00:00′ –until ’2015-04-10 23:59:59′ /var/lib/mysql/cloud-server-01-slow.log > slowqueryrange.log

3) For a particular database

pt-query-digest –filter ‘$event->{db} && $event->{db} =~ /employee/’ /var/lib/mysql/cloud-server-01-slow.log > slowqueroutputemp.log

pt-query-digest –filter ‘$event->{db} && $event->{db} =~ /market/’ /var/lib/mysql/cloud-server-01-slow.log > slowqueroutputmkt.log

4) For a particular user

pt-query-digest –filter ‘$event->{user} && $event->{user} =~ /root/’ /var/lib/mysql/cloud-server-01-slow.log > …

[Read more]
MySQL Group Replication – mysql-5.7.6-labs-group-replication

Hi all, a few months have passed since our first preview release of MySQL Group Replication. Now is the time for the second preview release of MySQL Group Replication, the plugin that brings multi-master update everywhere to MySQL, as described in Hello World post.

Introduced changes User interface changes

After receiving plenty of feedback and continuing to pursue a more integrated look and feel with MySQL, we have given the user interface a facelift. Some of the changes are:

  • The plugin has been renamed to group_replication, and as a consequence the plugin’s option names were also renamed to group_replication_*;
  • Start/stop command: now the commands are START/STOP GROUP_REPLICATION;
  • Performance_schema tables were improved to have better names, fields and relationships. …
[Read more]
mysql-cli on Kickstarter

Open Query is supporting the mysql-cli Kickstarter project (for MySQL and MariaDB) by Amjith Ramanujam who already successfully completed a similar tool for PostgreSQL.

It is a new MySQL client with Auto-Completion and Syntax Highlighting. From the info provided, it’s Python based, thus portable, and can be installed without root access. Could be a very useful tool. The good old mysql command line client does lack some things, yet a relatively low-level command line client is often useful for remote tasks (as opposed to graphical tools) so we reckon it’s good that this realm gets a bit of attention!

How to use mysql_config_editor – video

Below video will depict :

* How to set a login path

* How to use login path in mysql client

* How to use login path in mysqldump

* How to remove login path

 

 

You can download the slides from below URL

config_editor

Musings on MySQL enhancements

1) Update_time not accurate in information_schema.tables

Information_schema.tables has a field called update_time and in 5.6 you will notice that it is always NULL. Future versions of MySQL will fix this problem

2) Multiple instance manager

Currently creating , managing and dropping instances in MySQL requires many DBA hours. mysqld_multi is there to help you but it requires initial configuration and there are other third party utilities that could come to your rescue

It would be better to have built in utilities to help us in this regard.. For example db2 has db2icrt that creates an instance , db2ilist to list instances and db2idrop to drop an instance

3) Quiesce database in MySQL

There is no built in quiesce option to block all activity on the database/instance. Although method mentioned in  below URL will help you in doing manual quiesce …

[Read more]
Showing entries 91 to 100 of 1008
« 10 Newer Entries | 10 Older Entries »