Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 30 of 536 Next 30 Older Entries

Displaying posts with tag: Replication (reset)

Replication in MySQL 5.6: GTIDs benefits and limitations – Part 1
+1 Vote Up -0Vote Down

Global Transactions Identifiers are one of the new features regarding replication in MySQL 5.6. They open up a lot of opportunities to make the life of DBAs much easier when having to maintain servers under a specific replication topology. However you should keep in mind some limitations of the current implementation. This post is the first one of a series of articles focused on the implications of enabling GTIDs on a production setup.

The manual describes very nicely how to switch to GTID-based replication, I won’t repeat

  [Read more...]
MySQL binlogs - Don't forget to do your homework!
+0 Vote Up -1Vote Down
Now that I'm back doing just database stuff, I've come to realize I've gotten a little sloppy about doing my homework.  Homework's never been my favorite thing in the world, but it often reduces stress when your under the gun during an outage or upgrade... We had a MySQL database server that's been slow on DML changes, and based on the slowest statements being 'COMMIT', we had a good mind
Replication Enhancements in MySQL 5.7: SHOW SLAVE STATUS NONBLOCKING
Employee +3 Vote Up -0Vote Down
2013 is on it's initial months and we already have 5.6 GA and the first release of 5.7, 5.7.1 DMR with lots of exciting new features, future is promising!

A new feature added in replication was the NONBLOCKING option to SHOW SLAVE STATUS command.

In the past if we stop slave during a big transaction, until the transaction was applied we cannot execute SHOW SLAVE STATUS to see the slave progress. The latter operation would block until the former finish, this would disable all external monitoring or third-party applications that need a immediate response from server.

To solve this problem, NONBLOCKING option was added to SHOW SLAVE STATUS, when it is used we can





  [Read more...]
Delayed row-based replication with large tables lacking a primary key
+0 Vote Up -0Vote Down
I configure all our master databases to use row-based binary logging where I work. In my opinion it is a much safer option than statement-based replication. The advantages and disadvantages of both types of MySQL replication are detailed in the online documentation here. You can't view the events a slave is applying directly with 'show processlist' but by issuing 'show open tables where in use' you can detect what table is receiving the attention of the SQL thread. If you need more information the mysqlbinlog command must be used to decode the slaves relay logs or masters binary logs.

Our developers often change a lot of rows with a single update statement. This usually results in some reasonable replication lag on downstream

  [Read more...]
Got a packet bigger than ‘slave_max_allowed_packet’ bytes and binlog_format = STATEMENT | MIXED
+1 Vote Up -0Vote Down

Got a packet bigger than ‘slave_max_allowed_packet’ bytes and binlog_format=STATEMENT|MIXED

Since version 5.1.64 MySQL introduces a new variable named slave_max_allowed_packet, which was introduced to allow large updates using row-based replication do not cause replication to fail when exceeded max_allowed_packet.

The problem is if you have you replication using binlog_format=STATEMENT or binlog_format=MIXED it ignores this option and use as limit for queries what is on max_allowed_packet variable but still reporting on slave_max_allowed_packet

  [Read more...]
Tungsten University: Replicate Between MySQL And Oracle
+0 Vote Up -0Vote Down
  Oracle is the most powerful DBMS in the world. However, Oracle's expensive and complex replication makes it difficult to build highly available applications or move data in real-time to data warehouses and popular databases like MySQL. In this webinar you will learn how Continuent Tungsten solves problems with Oracle replication at a fraction of the cost of other solutions and with less
MySQL Applier For Hadoop: Implementation
Employee +4 Vote Up -0Vote Down

This is a follow up post, describing the implementation details of Hadoop Applier, and steps to configure and install it. Hadoop Applier integrates MySQL with Hadoop providing the real-time replication of INSERTs to HDFS, and hence can be consumed by the data stores working on top of Hadoop. You can know more about the design rationale and per-requisites in the previous post.

Design and Implementation:

Hadoop Applier replicates rows inserted into a table in MySQL to the Hadoop Distributed File System(HDFS). It uses an API provided by libhdfs, a C library to manipulate files in HDFS.

The library comes pre-compiled with Hadoop distributions.It






  [Read more...]
Galera pre-deployment check
+0 Vote Up -0Vote Down

One of the first things we do when preparing a client’s infrastructure for Galera deployment is see whether their schema is suitable.

  • Avoiding quirks and edge cases, we can say that Galera simply requires all tables to be InnoDB and also have a PRIMARY KEY (obviously having a PK in InnoDB is important anyway, for InnoDB-internal reasons).
  • We want to know about FULLTEXT indexes. With recent InnoDB versions also supporting FULLTEXT we need to check not just whether a table has such an index, but actually which engine it is.
  • Spatial indexes. While both InnoDB and MyISAM can deal with spatial datatypes (POINT, GEOMETRY, etc), only MyISAM has the spatial indexes.

Naturally, checking a schema in the server is more effective than going through other sources and possibly missing bits. On the downside, the only viable way to get this info out of MariaDB

  [Read more...]
MySQL Applier For Hadoop: Real time data export from MySQL to HDFS
Employee +2 Vote Up -0Vote Down

MySQL replication enables data to be replicated from one MySQL database server (the master) to one or more MySQL database servers (the slaves). However, imagine the number of use cases being served if the slave (to which data is replicated) isn't restricted to be a MySQL server; but it can be any other database server or platform with replication events applied in real-time! 
This is what the new Hadoop Applier empowers you to do.
An example of such a slave could be a data warehouse system such as Apache Hive, which uses HDFS as a data store. If you have a Hive metastore associated with HDFS(Hadoop Distributed File System), the Hadoop Applier can populate Hive


  [Read more...]
Installing and administering Tungsten Replicator - Part 2 : advanced
+2 Vote Up -0Vote Down

Switching roles

To get a taste of the power of Tungsten Replicator, we will show how to switch roles. This is a controlled operation (as opposed to fail-over), where we can decide when to switch and which nodes are involved.

In our topology, host1 is the master, and we have three slaves. We can either ask for a switch and let the script select the first available slave, or tell the script which slave should be promoted. The script will show us the steps needed to perform the operation.

IMPORTANT! Please note that this operation is not risk free. Tungsten replicator is a simple replication system, not a complete management tool like Continuent Tungsten. WIth the replicator, you must make sure that the applications have stopped writing to the master before starting the switch, and then you

  [Read more...]
Installing and Administering Tungsten Replicator - Part 1 - basics
+2 Vote Up -0Vote Down

Intro

Tungsten Replicator is an open source tool that does high performance replication across database servers. It was designed to replace MySQL replication, although it also supports replication from and to Oracle and other systems. In this article, we will only cover MySQL replication, both simple and multi-master.

Preparing for installation

To follow the material in this article, you will need a recent build of Tungsten Replicator. You can get the latest ones from http://bit.ly/tr20_builds. In this article, we are using build 2.0.8-167.

Before starting any installation, you should make sure that you have satisfied all the prerequisites. Don't

  [Read more...]
Why does MySQL replication fail?
+0 Vote Up -0Vote Down

Read the original article at Why does MySQL replication fail?

When considering active-active multi-master, you must consider it’s foundation technology. Although MySQL replication is straightforward to setup, it can fail in a myriad of ways. Most of those are known and well understood. We can solve them only if we use the technology in the standard way. Click through to the end for multi-master solutions [...]

For more articles like these go to Sean Hull's Scalable Startups

Related posts:
  • 5 Ways to fortify MySQL replication
  • Easy MySQL replication with
  •   [Read more...]
    MySQL Replication: Self-Healing Recovery with GTIDs and MySQL Utilities
    Employee_Team +2 Vote Up -0Vote Down

    MySQL 5.6 includes a host of enhancements to replication (http://www.mysql.com/products/enterprise/replication.html), enabling DevOps teams to reliably scale-out their MySQL infrastructure across commodity hardware, on-premise or in the cloud.

    One of the most significant enhancements is the introduction of Global Transaction Identifiers (GTIDs) where the primary development motivation was:

    - enabling seamless failover or switchover from a replication master to slave

    - promoting that slave to the new master

    - without manual intervention and with minimal service disruption.

    You can download the new MySQL Replication High Availability Guide (http://www.mysql.com/why-mysql/white-papers/mysql-replication-high-availability/) to

      [Read more...]
    Granting privileges may break replication in MySQL 5.6.10
    +2 Vote Up -0Vote Down

    MySQL lets database administrators define access rights on many levels – from the ability to run global commands down to access to individual columns. Some rights can be applied to many different objects, such as for example SELECT or UPDATE, which can be granted globally or restricted only to certain databases or tables, while others are only meant for one specific purpose. An example of the latter could be FILE privilege, which permits user to interact with the file system from inside a database instance. It only makes sense as the global right and not anywhere else.

    As any other activity that produces changes, GRANT statements are replicated to MySQL slaves. Regardless of the binary log format setting, such events are always logged in STATEMENT format. It is likely because the command needs to handle more than just updating the

      [Read more...]
    MySQL 5.6 Replication: All That Is New, On-Demand
    Employee_Team +1 Vote Up -0Vote Down

    The new MySQL 5.6 GA release delivers a host of new capabilities to support developers releasing new services faster, with more agility, performance and security .

    One of the areas with the most far-reaching set of enhancements is MySQL replication (http://www.mysql.com/products/enterprise/replication.html) used by the largest web, mobile and social properties to horizontally scale highly-available MySQL databases across distributed clusters of low cost, commodity servers.

    A new on-demand MySQL 5.6 replication webinar (http://www.mysql.com/news-and-events/web-seminars/mysql-5-6-replication-enabling-next-generation-of-web-mobile-social-and-cloud-services/) takes you on a guided tour through all of those enhancements, including:

    - 5x higher master and slave

      [Read more...]
    See You at Percona Live 2013!
    +1 Vote Up -1Vote Down
    Percona Live 2013 is coming up fast.  This is hands-down the best MySQL conference of the year, attended by a lot of people I really respect.  Check the speaker list if you need some of their names.  I will also be doing two talks myself.
    • 9am Wednesday 24 April - Keynote:  How MySQL Can Thrive in the World of Massive Data Hype.  NoSQL solutions are oversold, but this is no reason for complacency in the MySQL community.  There are new challenges in data management, and we need to solve them or become irrelevant.   I will show some of the advances Continuent

      [Read more...]
    Flexible Fail-over Policies Using MySQL and Global Transaction Identifiers
    Employee +1 Vote Up -0Vote Down
    << Previous Post: Advanced use of Global Transaction Identifiers

    As we saw in my previous posts, Global Transaction Identifiers in MySQL 5.6 allow you to change the replication topology arbitrarily. You don't even need to specify the positions in the replication stream – when you turn on auto-positioning, the master automatically sends only those transactions that are missing on the slave.

    When you do a fail-over, you want to make sure that the new master is up-to-date. For instance, consider the following scenario:





      [Read more...]
    Multi-master data conflicts - Part 2: dealing with conflicts
    +2 Vote Up -0Vote Down

    In the first part of this article we examined the types of conflicts and their causes. In this part, we will analyse some of the methods available to deal with conflicts.

    Pessimistic locking (or: conflicts won't happen)

    Applicability: synchronous clusters with 2pc

    We've covered this topic in the previous article, but it's worth repeating. If you use a synchronous cluster, you don't have conflicts. For example, MySQL Cluster ensures consistent data with updates coming from different nodes. However, MySQL Cluster is not a replacement for a MySQL server, and it has severe limitations.


    Optimistic locking

    Applicability: synchronous clusters without 2pc (Galera)

    Conflicting transactions proceed on different


      [Read more...]
    MariaDB Galera Cluster is a unique technology worth testing
    +2 Vote Up -0Vote Down

    As alway with new technology there is always different approaches regarding the adoption. You can try to use the bleeding edge features or start with a very standard configuration. My personal advise to new users is to start with the most basic configuration.

    This allow you to get familiar with the fundamentals : - how [...]

    Multi-master data conflicts - Part 1: understanding the problem
    +3 Vote Up -0Vote Down

    What is a conflict?

    Readers of this blog know that one of my favorite tools, Tungsten Replicator, can easily create multi-master replication topologies, such as all-masters, star, fan-in. While this is good news for system designers and ambitious DBAs, it also brings some inconvenience. When you allow updates to happen in more than one master, you risk having conflicts. You may have heard this term before. For the sake of clarity, let's define what conflicts are, before analyzing each case in detail.

    You have a conflict when several sources (masters) update concurrently the same data in asynchronous replication.

    It's important to stress that this happens with asynchronous replication. In a truly synchronous cluster, where all data is kept consistent through

      [Read more...]
    Sessions at Percona Live MySQL Conference 2013: fun, competition, novelties, and a free pass
    +3 Vote Up -0Vote Down

    The Percona Live MySQL Conference and Expo 2013 is almost 1 month away. It's time to start planning, set the expectations, and decide what to attend. This post will give a roundup of some of the sessions that I recommend attending and I look forward to.

    First, the unexpected!

    After much talk and disbelief, here they come! Oracle (http://www.mysql.com) engineers will participate to the Percona Live conference. This is wonderful! Their participation was requested by the organizers, by the attendees, and by community advocates, who all told the Oracle management how important it is to be in this conference. Finally, they have

      [Read more...]
    Deploying remote MySQL sandboxes
    +4 Vote Up -0Vote Down

    Stating the problem.

    In my job, I do a lot of testing. And no matter how much organized we try to be, we end up with fewer machines than we would need to run all the tests that we want.

    For some tasks, we can run MySQL Sandbox, and get the job done. But sometimes we need to make sure that applications and systems work well across the network, and we need to install and run systems on separate servers.

    However, when you test replication systems, and every cluster takes three or four servers, you run our of available hosts very quickly. So you decide to use the clusters that are dedicated to automated testing to also run your own manual tests. Soon you realize that the tests that you are running manually are clashing with the automated ones, or with the ones that your colleagues are running.

    A simple solution

      [Read more...]
    MySQL Web Reference Architectures - Your Guide to Innovating on the Web
    Employee_Team +5 Vote Up -0Vote Down

    MySQL is deployed in 9 of the top 10 most trafficked sites on the web including Facebook, Twitter, eBay and YouTube, as well as in some of the fastest growing services such as Tumblr, Pinterest and box.com

    Working with these companies has given MySQL developers, consultants and support engineers unique insight into how to design database-driven web architectures – whether deployed on-premise or in the cloud.

    The MySQL Web Reference Architectures (http://www.mysql.com/why-mysql/white-papers/mysql-reference-architectures-for-scalable-web-infrastructure/) are a set of documented and repeatable best practices for building infrastructure that deliver the highest levels of scalability, agility and availability with the lowest levels of cost, risk and complexity. 

    Four components common to most web and mobile properties are sized, with optimum

      [Read more...]
    Tungsten University: Set up and manage advanced replication topologies
    +0 Vote Up -0Vote Down
      Do you know how to set up Tungsten Replication to handle multi-master topologies? Do you know how to replicate transactions from multiple MySQL servers into a single slave? Do you know how to replicate between Tungsten clusters? In this course we show you how to set up and manage complex replication topologies using Tungsten.
    ddlscan - Utility to Help Analyze and Migrate Database Schemas
    +1 Vote Up -0Vote Down

    Intro


    While working on one of the MySQL to Oracle replication projects for Continuent, I needed to implement an open-source utility for transforming MySQL schema to an Oracle dialect (DDL statements that create specific schema on Oracle) to save from otherwise tedious work. This article introduces ./ddlscan tool, which does that and is extensible to do much more.

    Ingredients


    Here's what you'll need:
    • Your favorite DBMS with some tables. Currently supported MySQL, Oracle and PostgreSQL.
    • Latest Tungsten Replicator build. Not even needed to install, enough to untar.
    • Velocity template of your





      [Read more...]
    Parallel replication and GTID - A tale of two implementations
    +7 Vote Up -0Vote Down

    MySQL 5.6 is probably the version of MySQL with the biggest bundle of new features. You may want to try it soon, since it's now released as GA, and I would like to offer some practical experience on how to use some of the advanced features.

    Since replication is my main interest, I will focus on some of the new features in this field, and I will compare what's available in MySQL 5.6 with Tungsten Replicator.

    The focus of the comparison is usability, manageability, and some hidden functionality. Parallel replication has been available with Tungsten Replicator for almost two years, and Global Transaction Identifiers for much longer than that. With MySQL 5.6, it seems that the MySQL team wants to close the gap. While the main feature (parallel execution threads) is available and performing well, there are some

      [Read more...]
    New Tungsten Replicator w/ MySQL 5.6 & Amazon RDS support
    +4 Vote Up -0Vote Down
    Tungsten Replicator 2.0.7 enables new MySQL versions, provides better support for multi-master and parallel replication, and improves setup of advanced topologies. In the MySQL area, we have added the ability to replicate from MySQL into Amazon RDS instances, as well as initial certification for MySQL 5.6.  There are several important new features for multi-master replication, including better
    Tungsten Replicator 2.0.7 is released
    +5 Vote Up -0Vote Down

    Tungsten Replicator 2.0.7 was released today. In addition to a large number of bug fixes, this release adds several improvements for multi-master management, and support for Amazon RDS (as a slave).

    While the Release Notes show a long list of improvements, I would like to focus on some of them that improve the handling of multi-master deployments.

    When we released version 2.0.6, we added the first revision of the cookbook recipes in the build. That was still a green addition, which caused several bug reports. But since then, we have integrated the cookbook in our internal testing, making these recipes more robust and reliable. We are also planning to improve

      [Read more...]
    Data Fabric Design Patterns: Fabric Connector
    +2 Vote Up -0Vote Down
    This article is the third in a series on data fabric design and introduces the fabric connector service design pattern.  The previous article in this series introduced the transactional data service design pattern, which defines individual data stores and is the building block for data fabrics based on SQL databases.  The fabric connector builds on transactional data services and is another basic building block of fabric architecture.

    Description and Responsibilities
    Fabric connectors make a collection of DBMS servers look like a single server.  The fabric connector presents what appears to be a data service API to applications.  It


      [Read more...]
    About MySQL 5.6
    +14 Vote Up -2Vote Down
    I am very excited and thrilled to use the latest release of MySQL 5.6 in production. This is probably the most notable and innovative release from many years, if not ever. During the last year, we had the chance to work with many new features and to test if fixes to old issues were working...
    Showing entries 1 to 30 of 536 Next 30 Older Entries

    Planet MySQL © 1995, 2013, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

    Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.