Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 6th March 2007, 22:15
SoftDux SoftDux is offline
Member
 
Join Date: Oct 2006
Posts: 35
Thanks: 1
Thanked 0 Times in 0 Posts
Default mysql master master replication not working

Hi

Can someone please help me?

I have followed the mysql master-master replication howto, but it doesn't seem to work.

if I run the command "slave start;" I get the following error:

Code:
ERROR 1200 (HY000): The server is not configured as slave; fix in config file or
 with CHANGE MASTER TO
Empty set (0.00 sec)
Can someone please tell me where / how to set the slave?
Reply With Quote
Sponsored Links
  #2  
Old 7th March 2007, 20:12
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

What's in the my.cnf file of the slave?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 27th March 2007, 20:10
1soproni 1soproni is offline
Junior Member
 
Join Date: Mar 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

My problem is the same as SoftDux's.
mysql-5.0.37
Step10:
Quote:
mysql> start slave;
ERROR 1200 (HY000): The server is not configured as slave; fix in config file or with CHANGE MASTER TO
mysql>
Master1/Slave2:

[client]
port = 3307
socket = /tmp/mysql.sock

[mysqld]
port = 3307
socket = /tmp/mysql.sock
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
log-bin=mysql-bin

binlog_do_db=valami
binlog_ignore_db=mysql
binlog_ignore_db=test
server-id = 1
master-host = 1.2.3.4
master-user = replication
master-password = slave2
master-port = 3307

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

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

[mysqlhotcopy]
interactive-timeout
------------------------------------------
Slave1/Master2:

[client]
port = 3307
socket = /tmp/mysql.sock

[mysqld]
port = 3307
socket = /tmp/mysql.sock
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M

log-bin=mysql-bin

binlog_do_db=valami
binlog_ignore_db=mysql
binlog_ignore_db=test

server-id = 2
master-host = 5.6.7.8
master-user = replication
master-password = slave
master-port = 3307

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

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

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

[mysqlhotcopy]
interactive-timeout


Master1/Slave2 log:
070327 17:11:21 [Warning] Neither --relay-log nor --relay-log-index were used; s
o replication may break when this MySQL server acts as a slave and has his hostn
ame changed!! Please use '--relay-log=www3-relay-bin' to avoid this problem.
070327 17:11:21 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.0.37-log' socket: '/tmp/mysql.sock' port: 3307 MySQL Community Se
rver (GPL)
070327 17:11:21 [Note] Slave SQL thread initialized, starting replication in log
'FIRST' at position 0, relay log './www3-relay-bin.000011' position: 98
070327 17:11:21 [Note] Slave I/O thread: connected to master 'test@:3307', repl
ication started in log 'FIRST' at position 4
070327 17:11:21 [ERROR] The slave I/O thread stops because master and slave have
equal MySQL server ids; these ids must be different for replication to work (or
the --replicate-same-server-id option must be used on slave but this does not a
lways make sense; please check the manual before using it).
070327 17:11:21 [Note] Slave I/O thread exiting, read up to log 'FIRST', positio
n 4
Reply With Quote
  #4  
Old 28th March 2007, 17:04
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by 1soproni
Master1/Slave2 log:
070327 17:11:21 [Warning] Neither --relay-log nor --relay-log-index were used; s
o replication may break when this MySQL server acts as a slave and has his hostn
ame changed!! Please use '--relay-log=www3-relay-bin' to avoid this problem.
Please try to add
Code:
relay-log = www3-relay-bin
to the my.cnf files and try again.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 28th March 2007, 21:20
1soproni 1soproni is offline
Junior Member
 
Join Date: Mar 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

070328 18:19:39 [Note] Slave SQL thread initialized, starting replication in log
'FIRST' at position 0, relay log './www3-relay-bin.000013' position: 98
070328 18:19:39 [Note] Slave I/O thread: connected to master 'test@:3307', repl
ication started in log 'FIRST' at position 4
070328 18:19:39 [ERROR] The slave I/O thread stops because master and slave have
equal MySQL server ids; these ids must be different for replication to work (or
the --replicate-same-server-id option must be used on slave but this does not a
lways make sense; please check the manual before using it).
070328 18:19:39 [Note] Slave I/O thread exiting, read up to log 'FIRST', positio
n 4

"Show variables;" shows differents server-ids.
Reply With Quote
  #6  
Old 29th March 2007, 15:31
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
 
Default

I found something interesting at the end of this page: http://atmail.com/view_article.php?num=580
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql Master Master replication stormrider HOWTO-Related Questions 5 16th February 2007 19:18
Messed up ISPConfig-2.2.8 Upgrade Morons Installation/Configuration 4 29th November 2006 13:17
ISPConfig server also a MySQL replication slave jamesh Installation/Configuration 1 2nd August 2006 10:59
PHP & MySQL working, but AREN'T WORKING???? lipp9000 Installation/Configuration 4 21st July 2006 18:01
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 17:04


All times are GMT +2. The time now is 22:12.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.