{"id":6855,"date":"2014-04-28T09:42:05","date_gmt":"2014-04-28T07:42:05","guid":{"rendered":"http:\/\/code.openark.org\/blog\/?p=6855"},"modified":"2014-04-28T14:19:12","modified_gmt":"2014-04-28T12:19:12","slug":"when-you-cannot-replicate-from-master-m-to-slave-s","status":"publish","type":"post","link":"https:\/\/code.openark.org\/blog\/mysql\/when-you-cannot-replicate-from-master-m-to-slave-s","title":{"rendered":"When you cannot replicate from master M to slave S"},"content":{"rendered":"<p>Working on some replication topology automation, here are some rules that will prevent you from replicating from a MySQL server <strong>M<\/strong> to a slave <strong>S<\/strong>:<\/p>\n<ul>\n<li><strong>M<\/strong> does not have binary logs (<strong>log_bin<\/strong>) enabled<\/li>\n<li><strong>M<\/strong> is itself a slave and does not have <strong>log_slave_updates<\/strong> enabled<\/li>\n<li><strong>M<\/strong> has a higher major version than <strong>S<\/strong> (e.g. <strong>M<\/strong> is <strong>5.6<\/strong> and <strong>S<\/strong> is <strong>5.5<\/strong>, but do note <a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.6\/en\/replication-options-binary-log.html#option_mysqld_log-bin-use-v1-row-events\">log_bin_use_v1_row_events<\/a>)<\/li>\n<li>Both servers have same <strong>server_id<\/strong><\/li>\n<li><strong>S<\/strong> has <strong>log_bin<\/strong> &amp; <strong>log_slave_updates<\/strong>, uses <strong>STATEMENT<\/strong> <strong>binlog_format<\/strong>, and <strong>M<\/strong> uses <strong>ROW<\/strong> or <strong>MIXED<\/strong> <strong>binlog_format<\/strong><\/li>\n<li><strong>S<\/strong> has <strong>log_bin<\/strong> &amp; <strong>log_slave_updates<\/strong>, uses <strong>MIXED<\/strong> <strong>binlog_format<\/strong>, and <strong>M<\/strong> uses <strong>ROW<\/strong> <strong>binlog_format<\/strong><\/li>\n<li><strong>S<\/strong> and <strong>M<\/strong> are using different replication filters (some rules could work; good luck if you&#8217;re that adventurous)<\/li>\n<\/ul>\n<p>[EDIT: the above is configuration-wise]<\/p>\n<p>Did I miss anything? Please comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Working on some replication topology automation, here are some rules that will prevent you from replicating from a MySQL server M to a slave S: M does not have binary logs (log_bin) enabled M is itself a slave and does not have log_slave_updates enabled M has a higher major version than S (e.g. M is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[5],"tags":[8],"class_list":["post-6855","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-replication"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2bZZp-1Mz","_links":{"self":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/6855","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/comments?post=6855"}],"version-history":[{"count":4,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/6855\/revisions"}],"predecessor-version":[{"id":6859,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/6855\/revisions\/6859"}],"wp:attachment":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/media?parent=6855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/categories?post=6855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/tags?post=6855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}