• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 422
  • Last Modified:

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..


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....

This has not resolved the issue. Please help :)
2 Solutions
Michael WorshamInfrastructure / Solutions ArchitectCommented:
Try adding 'replicate-ignore-db=<3rd database>' to the list as well.

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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now