Results 1 to 2 of 2
HI
I am trying to Setup MySQL the Master and slave replication. I did the following Steps but it didn't work.
Step 1:
Master : 192.168.10.129
Slave : 192.168.10.67
Step ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-11-2007 #1Just Joined!
- Join Date
- Jun 2007
- Posts
- 1
Mysql Master Slave Replication
HI
I am trying to Setup MySQL the Master and slave replication. I did the following Steps but it didn't work.
Step 1:
Master : 192.168.10.129
Slave : 192.168.10.67
Step 2:
On Master
Made Changes in /etc/my.cnf file
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
old_password=1
log-bin
binlog-do-db=<database name> #input the database which should be
replicated
binlog-ignore-db=mysql
ignored for replication
binlog-ignore-db=test
server-id=1
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld.pid
step 3:
On Master
~]# mysql
Here i got error like: Error 2002(HY000): can't connect to the local mysql server through socket ' /var/lib/mysql/mysql.sock'
and also mysql.sock file is not created.
Step 4:
On Master
service mysqld restart
Mysql is also restarting failed....
Help me to do the MySQL Replication in Master and Slave
Venkat
- 06-14-2007 #2Just Joined!
- Join Date
- Jun 2007
- Posts
- 2
mysql not replicating -Slave_IO_Running: NO
Hi
I tried the following steps to do the MySql Master and slave replication.
Step 1:
Master : 192.168.10.129
Slave : 192.168.10.67
Step 2:
On Master
Made Changes in /etc/my.cnf file
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
old_password=1
log-bin
binlog-do-db=<database name> #input the database which should be
replicated
binlog-ignore-db=mysql # input the database that should be
ignored for replication
binlog-ignore-db=test
server-id=1
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld.pid
step 3:
On Master
mysql> grant replication slave on *.* to 'replication'@192.168.10.67 identified by 'slave';
After this everything is ok and service mysqld also restarted without any error.
Step4:
On Slave System:
I edited my.conf file in the following contents
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
old_password=1
log-bin
binlog-do-db=<database name> #input the database which should be
replicated
binlog-ignore-db=mysql # input the database that should be
ignored for replication
binlog-ignore-db=test
server-id=2
master-host=192.168.10.129
master-user=replication
master-password=slave
master-port=3306
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld.pid
After this changes here also mysql service restarted without any error.
Step 5:
On Slave System:
mysql> start slave;
mysql> show slave status\G;
Here i got error message like
Master_Log_File:
Slave_IO_Running:No
Slave_SQL_Running:Yes
Here that Slave_IO_Running should be "Yes" and Master_Log_File: also showing nothing. But it shows No only always. So the replication is not done in the slave system.
Please tell me what will be the problem in the above steps.
If anyone has gone through this process successfully please help me through the same.
regards
P.Sasikumar


Reply With Quote
