Is it possible for me to have a unique binary log per MySQL database on my MySQL server? I've done some googling and can't seem to find any solutions. Surely there's a way!!
feedback
|
|
Acutally, there is a way, but it takes some work if you really require it. I already posted something about 6 months ago describing how to set up a Star Topology. You can use the same concept. Here is the scenario For this example, you have three databases: members, dbblogs, reports. Step 01) Setup Binary Logging on the MasterIf binary logging in not enabled, you can enable it
Restart mysql after adding Step 02) Setup MySQL Instance datadir for Each Specfic Database
Step 03) Create a MySQL Service for Each DatabaseMake sure each config file has the following: /etc/my3307.cnf
/etc/my3308.cnf
/etc/my3309.cnf
Step 04) Start the three services
Step 05) Perform mysqldump of database schema only from the Master, no dataDo not include mysql schema !!!
Step 06) Edit /root/MySQLSchema.sql to use only the BLACKHOLE storage engineIn vi, run these two replaces in the file /root/MySQLSchema.sql:
Step 07) Create a Replication User on the Master
Step 08) Setup the 3 MySQL Instances as Slaves to Master using
Step 09) Load MySQL Schema into the three MySQL Instances
Binary logs are Cleared in the three Instances and Replication is started From there, Each DB instance will record only its designated database's binlog entries Give it a Try !!! UPDATE 2011-10-20 15:37 EDTPlease keep in mind that the three slaves will contain only binlogs and not data. | ||||
|
feedback
|
|
No. The | |||
|
feedback
|
|
No, but you can filter the binary log afterwards using | |||
|
feedback
|