473,574 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

replication error after promoting slave to master

After a failure, we promoted a slave to master. This included renaming the
server to the old master's name and ip address, but leaving the server id
alone.

The new master works fine.

We repaired the old server, gave it a different name and ip address but
leaving the server id the same.

I get the following error on the slave:

051101 08:01:39 mysqld started
051101 8:01:40 InnoDB: Started; log sequence number 0 1920097
/usr/libexec/mysqld: ready for connections.
Version: '4.1.12' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source
distribution
051101 8:01:40 [Note] Slave SQL thread initialized, starting replication
in log 'FIRST' at position 0, relay log './battleship-relay-bin.000002'
position: 4
051101 8:01:40 [Note] Slave I/O thread: connected to master
'slaveuser@firs trate:3306', replication started in log 'FIRST' at position
4
051101 8:01:40 [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 always make sense; please check the manual before using it).
051101 8:01:40 [ERROR] Slave I/O thread exiting, read up to log 'FIRST',
position 4
-----------------------------------------------
my.cnf on master
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
server-id=1
#master-host=firstrate
#master-user=slaveuser
#master-password=****
log-bin=/var/lib/mysql/binlog
max_connections =500

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

-----------------------------------------------------------------------
my.conf on slave

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
server-id=2
master-host=firstrate
master-user=slaveuser
master-password=****
#log-bin=/var/lib/mysql/binlog
max_connections =500

[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
-----------------------------------------------------------
physical setup
Old setup:
MySQL Master
server Id = 2
Hostname= firstrate
ip= 192.168.10.254
physical machine #2

MySQL slave
server ID = 1
Hostname = oldfirstrate
ip = 192.168.10.253
physical machine #1

New setup
MySQL Master
server ID = 1
Hostname = firstrate
ip= 192.168.10.254
physical machine #1

MySQL slave
server ID = 2
Hostname = battleship
ip = 192.168.10.253
physical machine #2

I suspect that somewhere internally MySQL stores Hostname and ID. When we
changed masters, this data was no longer correct.

I've tried changing server ids and re-installing mysql on the slave. We've
tried the Change Master command. We've removed the master.info file, as
well.

Any ideas on how we fix it?
Visit www.sexystuff.net/ssis.html Adult Friendly Webhosting done cheap!
Nov 3 '05 #1
0 3240

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
573
by: Jason McCormick | last post by:
Hello all, I was wondering if someone could shed some light on this problem I'm having. I have 3 slave MySQL servers replication from a master machine. The master machine is running only MySQL while the slave machines are an Apache + Tomcat + MySQL web service. All slave machines are precisely identical. I'm running into a situation...
0
3251
by: I.P. | last post by:
Hi, it's my story. I have two 4.0.14 mysql server on one machine with win XP Professional polish version. First acts as master: on port 3300 Second acts as slave: on port 3301 below my configuration:
0
2128
by: I.P. | last post by:
No one has replied to my post. ----- Original Message ----- From: "I.P." <jancio_wodnik@wp.pl> To: <mysql@lists.mysql.com> Sent: Monday, August 18, 2003 1:01 PM Subject: mysql 4.0.14 + replication + windows XP PROF Hi, it's my story.
0
583
by: I.P. | last post by:
------=_NextPart_000_03FF_01C368A4.75720DC0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Hi, it's my story. I have two 4.0.14 mysql server on one machine with win XP Professional polish version.
3
18959
by: Sander Smeenk | last post by:
Hello! I'm trying to set up replication between two servers and even though I did everything according to the documentation, the slave keeps failing to connect to the master like this: | 050119 0:23:43 Slave SQL thread initialized, starting replication in | log 'zwart-bin.001' at position 79, relay log './blauw-relay-bin.001' |...
0
1934
by: Mike | last post by:
Hello, We are using mysql v4.0.24 on Linux machines. I'm trying to set up replication with a master and only one slave database. The syncronization seems to work well, the relay file on slave is wrote correctly (Read_Master_Log_Pos and Relay_Log_Pos are updated) but the information on slave database is not updated. Master and slave are...
3
5447
by: muldoon | last post by:
I'm having quite a fuss with my two MySQL DB servers lately. I'm trying to establish replication between a MySQL 4.0.20 server (master) and a MySQL 4.1.11 server (slave). From what I read, replication from a 4.0.x server -> 4.1.x server will work, just not the other way around. However, that's not really my problem. After unsuccessfully...
2
434
by: David Parker | last post by:
Hi. I'm new to postgresql in general, and have been tasked with coming up with a replication solution for our postgresql based application. Assuming we don't bite off trying to roll our own solution, it looks like the open-source options for replication are: 1) contrib/rserv 2) erserver 3) slony 4) pgreplication
3
6082
by: Juan Antonio Villa | last post by:
Hello, I'm having a problem replicating a simple database using the binary log replication, here is the problem: When the master sends an update to the slave, an example update reads as follows: UPDATE MainInfo SET dAddress='38 Holland Blvd', dCity='miami', dState='FL', dZip='33000', dCountry='USA', dPhone='999987565',...
0
7747
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8093
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7843
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6498
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5643
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5331
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3785
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2262
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1364
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.