| Bug #23615 | Documentation regarding MySQL replication setup is outdated. | ||
|---|---|---|---|
| Submitted: | 25 Oct 2006 6:45 | Modified: | 7 Feb 2007 13:49 |
| Reporter: | Jason Jackson | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
| Version: | 5 | OS: | |
| Assigned to: | MC Brown | CPU Architecture: | Any |
| Tags: | documentation, replication setup | ||
[25 Oct 2006 6:45]
Jason Jackson
[25 Oct 2006 7:19]
Kristian Koehntopp
The background: Replication Best Practice talk on freenode:#mysql. Could somebody from the Documentation team please contact Jason? 11:46 nevele> when setting up replication, if i am building binary logs on the master for several databases (multiple binlog-do-db statements), can i have a slave which only replicates one of those databases (a single replicate-do-db statement)? Or, do the number of binlog-do-db statements have to equal the number of replicate-do-db statements between master and slave? thanks 11:52 Isotopp> nevele: never use binlog-do-db statements. 11:52 Isotopp> nevele: they do not work the way you think they do PLUS you get an incomplete binlog, which is bad for recovery (point-in-time recovery becomes difficult) 11:52 Isotopp> nevele: always use replicate-statements on the slave for partial replication 11:53 Isotopp> nevele: also, use replicate-wild-do-table=db.%, do not use replicate-do-db=db 11:58 nevele> Isotopp: So if i want to have one master build a binlog of all databases, then have multiple slaves each replicating defferent databases from the master, this is best done with replicate-statements? didnt see anything about this in the mysql docs 11:58 Isotopp> nevele: on the master, provide a log-bin=binlog statement, and a proper expire_logs_days=7 or so statement. 11:59 Isotopp> nevele: on a slave, for each database the slave shall replicate, provide a replicate-wild-do-table=databasename.% statement 12:00 Isotopp> nevele: that is about all that there is to do. 12:59 nevele> also, if it is advisable to not use binlog-do-db on a master, why is that how the setup on the mysql docs describes it, is this outdated? 13:00 Isotopp> nevele: i have no idea. yes, it may be historical reasons. 13:00 Isotopp> nevele: anyway, you ALWAYS want a complete binlog on the master because of backup and PIT Recovery. 13:10 nevele> Isotopp: So really everything is done on the side of the slave, the master only provides the binary log.. cool.. 13:12 Isotopp> yes, that is the general idea. masters are lazy, the slaves must do all the work. 13:14 nevele> Isotopp: Great, that is much better logic.. Once i get this polished off i would be happy to write up a summary of your input into a more updated howto and submit it back to you.. Just to have the howto in the mysql docs a little more current.. 13:23 nevele> Isotopp: I would be happy to update the doc on the mysql site to reflect this if you like.. 13:24 Isotopp> nevele: open a bug report on bugs.mysql.com against the documentation and supply the url you want fixed as well as alternative content. 13:25 Isotopp> nevele: be sure you mail be your bug number, mail it to kris@mysql.com 13:25 nevele> Isotopp: will do.
[25 Oct 2006 8:48]
Valeriy Kravchuk
Thank you for a documentation request. Please, send URL of the manual page you want to change and point out what exact text seems outdated to you.
[26 Oct 2006 11:17]
Jason Jackson
The URL of the outdated page is: http://dev.mysql.com/doc/refman/5.0/en/replication-howto.html mysql > SHOW MASTER STATUS; +---------------+----------+--------------+------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | +---------------+----------+--------------+------------------+ | mysql-bin.003 | 73 | test | manual,mysql | +---------------+----------+--------------+------------------+ This would imply that the master is using binlog-do-db statements, which is an outdated approach. There could also be more information regarding the base replication statements that need to be located in my.cnf on the master and slave server to have a minimal replication setup. I would happy to assist in updating the doc to add a little more clarity. Thanks.
[26 Oct 2006 12:18]
Valeriy Kravchuk
Thank you for clarification and willing help.
[7 Feb 2007 13:49]
MC Brown
I've added a new section to the 5.1 manual that will also be applied to the 5.0 manual. Please see: http://dev.mysql.com/doc/refman/5.1/en/replication-solutions-partitioning.html
