Replication for specific mysql databases

Hey Guys,

I am trying to get replication going for two specific databases on my master machine which currently houses 3 databases.

My Server is running MYSQL 5.0 on a Windows 2003 server box 32 bit.

Anyhow I dumped my two databases seperately using mysqldump. The command line used was as follows.

mysqldump --username=root --password --databases db1name --master-data --hex-blob >db1name.sql

mysqldump --username=root --password --databases db2name --master-data --hex-blob >db2name.sql

These were also restored separately into the slave.

I set the my.ini file with the following..

binlog-do-db=db1name
binlog-do-db=db2name

After doing this, when I show master status, the log pos never moves. If i remove the .ini entries, the position moves. On the slave it is only replicating DB2 and not DB1.

I tried adding the following to the slave ini....
replicate-do-db=db1name
replicate-do-db=db2name

This has not resolved the issue. Please help :)
vinodj181Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michael WorshamStaff Infrastructure ArchitectCommented:
Try adding 'replicate-ignore-db=<3rd database>' to the list as well.

Reference:
http://www.haidongji.com/2007/08/06/mysql-replication-notes-2replicating-only-certain-databases/
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
snoyes_jwCommented:
Do you fully identify databases in your statements, e.g. INSERT INTO dbname.tablename; or do you set a default db, e.g. USE dbname; or mysql_select_db(dbname) and then use just INSERT INTO tablename?

The former will not permit the replication rules to work properly. They rely on the latter.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.