[MySQL] Dual Master Replikation - Änderungen werden nicht übernommen.

Herr_M

Erfahrenes Mitglied
Hallo zusammen,

Ich habe mir gerade ein System mit 2 MySQL Datenbanken aufgesetzt und eine Dual Master Replikation aufgesetzt.
Die beiden Datenbanken laufen auf dem selben Rechner und funktionieren jede für sich genommen (auch im gleichzeitigen Betrieb) ohne Probleme.

Hab dazu verschiedene Tutorials ausprobiert:
http://crazytoon.com/2008/02/29/mys...ster-replication-in-mysql-centos-rhel-fedora/

http://wiki.dauberschmidt.de/index.php/Dual-Master_MySQL_Replikation

http://howtoforge.com/mysql5_master_master_replication_debian_etch

In den verschiedenen Tutorials steht im großen und ganzen immer das gleiche, also keine nennenswerten Unterschiede oder irgendwas das vergessen worden sein könnte.

Mein Problem ist jetzt, das zwar laut log-Files und auch SHOW MASTER STATUS und SHOW SLAVE STATUS keine Fehler vorliegen und die Replikation synchron ist.
Wenn ich aber an einer der beiden Datenbanken eine Änderug vornahme, wird diese nicht in der anderen übernommen.
Hier die Konfiguration (my.cnf) die ich für beide Server verwende. Natürlich ist die Server-Id und der Port beim zweiten Server anders, aber dafür wollte ich die zweite my.cnf nicht auch noch komplett hier posten.

Code:
# Example MySQL config file for very large systems.
#
# This is for a large system with memory of 1G-2G where the system runs mainly
# MySQL.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/lib/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.


# Here follows entries for some specific programs

# The MySQL server
[ mysqld]
skip-locking
key_buffer = 384M
max_allowed_packet = 200M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
# 
#skip-networking

#Replication Parameters

server-id       = 2
replicate-same-server-id = 0
auto_increment_increment=2
auto_increment_offset=2

# Replication Slave Stuff
# for replication 3306 to 3307
master-host = localhost
master-user = replication
master-password = einPasswort
master-port = 3306

# Replication Stuff Master
# for replication 3307 to 3306
log-bin = /database2/mysql/mysql-bin

# The safe_mysqld script
[safe_mysqld]

[mysqldump]
quick
max_allowed_packet = 200M

[ mysql]
prompt  = (\U) [\d]>
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

Wenn ich nun mit folgendem Skript die Replikation testen will und z.B. wie hier ein Update durchführe passiert auf der zweiten DB nichts.

Code:
Use testschema;

Update testtabelle
set name= 'Test'
where Id = 951;

Hat jemand ne Idee was noch fehlt und warum es nicht funktioniert?
 

Neue Beiträge

Zurück