473,748 Members | 8,392 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 3253

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 where (seemly at random) after a month or two of consistently flawless performance, just ONE of the...
0
3264
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
2145
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
18988
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' | position: 4 | 050119 0:23:43 Slave I/O thread: error connecting to master
0
1947
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 sincronyzed as shown below but for some reason I don't understand.
3
5457
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 completing the configuration myself, I used http://forums.gentoo.org/viewtopic.php?t=241123 as a...
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
6091
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', dNum='AC15857', dName='Michael A Scott' WHERE did=22'
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9324
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8243
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6074
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4606
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3313
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
2
2783
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.