473,383 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Mysql Master - Server Replication

147 100+
hi,

I am trying to set Master-Server Replication.I followed the following steps,even though slave can't able to connect the master.

master ip : 10.93.210.133
slave ip : 10.93.210.211

Steps in Master Server:

1. Changes in my.cnf file
(uncommented this two lines in my.cnf file)
log-bin = mysql-bin
server-id = 1

2.Restarted mysql

3.login as root in mysql and creating new users look on this

Expand|Select|Wrap|Line Numbers
  1. mysql>GRANT REPLICATION SLAVE ON *.* TO 'slaveuser'@'10.93.210.211'
  2. IDENTIFIED BY 'slave';



4.show master status;
(for mysql file and position)


Steps in Slave Server:

Expand|Select|Wrap|Line Numbers
  1. 1. Changes in my.cnf file
  2.                      (uncommented this two lines in my.cnf file)
  3.  
  4.                      server-id = 2
  5.  
  6. 2.login :
  7. shell>mysql -u root -proot
  8.  
  9. mysql>CHANGE MASTER TO
  10. MASTER_HOST=’10.93.210.133’,
  11. MASTER_USER=’slaveuser’,
  12. MASTER_PASSWORD=’slave’,
  13. MASTER_PORT=3306,
  14. MASTER_LOG_FILE=’mysql-bin.000001',
  15. MASTER_LOG_POS=98,
  16. MASTER_CONNECT_RETRY=10;
  17.  
  18. mysql>start slave;
  19. empty rows affected



By seeing,mysql log on slave server ....showing an error message,can't connect to master.

Please see this step and solve my problem....did i made any mistakes in setting master - slave replication ?
Jun 11 '10 #1
2 1608
mwasif
802 Expert 512MB
Did you restart the slave after editing my.cnf?

Make sure you use single quotes not the back ticks around values in the below statement.
Expand|Select|Wrap|Line Numbers
  1. CHANGE MASTER TO
  2. MASTER_HOST=’10.93.210.133’,
  3. MASTER_USER=’slaveuser’,
  4. MASTER_PASSWORD=’slave’,
  5. MASTER_PORT=3306,
  6. MASTER_LOG_FILE=’mysql-bin.000001',
  7. MASTER_LOG_POS=98,
  8. MASTER_CONNECT_RETRY=10;
Jun 17 '10 #2
santhanalakshmi
147 100+
Yes,i restarted the master server and the slave server.
Jun 18 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Joe Gainey | last post by:
Currently we have a web based application that is mostly reads (4:1 r/w). It is using a single MySQL database server. Is there any way to have two database servers in a master/master...
0
by: Luc Foisy | last post by:
Last week many of our server and client servers had a power problem. Not = quite sure how the servers were handled, wasn't on site, but I don't = think some of these servers got shut down...
0
by: flubdgub | last post by:
Quick question I haven't found a straight answer to in MySQLs docs... In the case of 2 3.23.X series mysql databases in a master/slave replication setup (myiasm tables), if a FLUSH TABLES WITH...
1
by: onewebclick | last post by:
I building a website with MYSQL database server and Tomcat server to serve data. do i need buy a commercial license ? or is it free ? website it basicaly free and generates revenue through...
3
by: Vincento Harris | last post by:
Sql Server 7 Standard Edition My Server was renamed and the normal steps of reinstalling and running sp_dropserver and sp_addserver were followed. Everything seems to work fine but jobs from the...
2
by: David | last post by:
Is there a good DataBase Abstraction layer that will handle the mySql, Sql Server, and MS Access engines? I do not wish to write the same functions with the three different PHP db functions. ...
0
by: charles | last post by:
What is the proper procedure for promoting a Slave into a Master replication server? We want to do some fail-over testing. When we tried this in the past, the former master would not replicate....
2
by: Beda Christoph Hammerschmidt | last post by:
MySQL, Access, ODBC, Replication Hello, i have a central mysql database that is accesed by multiple clients running MS Access with ODBC. This works fine if Access has a permanent connection...
0
by: ramesh1210 | last post by:
Please help me:Is the Postgre replication is used for two master asynchronus replication.Is this suitable for postgresql 7.3 or 7.4 versions
1
by: shivapadma | last post by:
i want to access mysql database server through c++ program for that ,first i should connect to mysql database sever. for that, some driver is required to connect,so which driver is required? ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.