MYSQL replication in the same box
MYSQL 5.0.17 standard (SLAVE) - 10.0.0.1
MYSQL 4.1.1 standard (MASTER) - 10.0.0.2
MASTER (my.cnf)
server-id = 1
log-bin
replicate-do-db = dbrep
mysql > SHOW MASTER STATUS;
mysql > grant replication slave, replication client,file,super,reload,select on *.* to root@’%hostname%’ identified by ‘mysql’;
mysql > SHOW SLAVE STATUS;
mysql > grant all on *.* to root@%hostname% identified by ‘mysql’;
Above mentioned query can be used to chnage the slave info at runtime. restart both MYSQL SLAVE & MASTER
Now create the database at MASTER and start creating tables and inserting values into it. Check the slave it started replicating all those tables.
1 | Chennai mein ek saal 07th Oct 2005 se 30th Sep 2006 tak. « Irfan World
[...] MySQL Replication [...]
Recent Comments