Re: Replica questions
Do I jsut need to monitor better and manually add it should the log and pos change? -Bryan On Wed, Mar 11, 2009 at 7:05 PM, Baron Schwartz ba...@xaprb.com wrote: That's deprecated too :-) On Wed, Mar 11, 2009 at 9:17 PM, Cui Shijun rancp...@gmail.com wrote: hi, #2. try adding the information of master into my.cnf then restart the server. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Replica questions
When you start up replication the data should be recorded in the master.info in your data dir. [r...@someserver ~]# cat /var/lib/mysqldata/master.info 14 MASTERHOST-bin.01 MASTERPOS 192.168.0.2 REPLICATION_USER REPLICATION_PASSWORD 3306 60 0 I am not familiar with any setups where the master.info would not be created, and I am too lazy too look for a setting that would lead to such an silly/annoying state. On Thu, Mar 12, 2009 at 10:03 AM, Bryan Irvine sparcta...@gmail.com wrote: Do I jsut need to monitor better and manually add it should the log and pos change? -Bryan On Wed, Mar 11, 2009 at 7:05 PM, Baron Schwartz ba...@xaprb.com wrote: That's deprecated too :-) On Wed, Mar 11, 2009 at 9:17 PM, Cui Shijun rancp...@gmail.com wrote: hi, #2. try adding the information of master into my.cnf then restart the server. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=wult...@gmail.com -- Rob Wultsch wult...@gmail.com wultsch (aim) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Replica questions
The information is there and the replica can connect on a reboot but only if that information has not changed correct? e.g. I reboot the slave, and on the master just run reset master; the bin.01 could change to bin.02 and the pos change from 98 to 15443 or some such. If I do that do I then need to re-run the set master to statements when the slave comes back up? or can that be handled automatically? -Bryan On Thu, Mar 12, 2009 at 10:26 AM, Rob Wultsch wult...@gmail.com wrote: When you start up replication the data should be recorded in the master.info in your data dir. [r...@someserver ~]# cat /var/lib/mysqldata/master.info 14 MASTERHOST-bin.01 MASTERPOS 192.168.0.2 REPLICATION_USER REPLICATION_PASSWORD 3306 60 0 I am not familiar with any setups where the master.info would not be created, and I am too lazy too look for a setting that would lead to such an silly/annoying state. On Thu, Mar 12, 2009 at 10:03 AM, Bryan Irvine sparcta...@gmail.com wrote: Do I jsut need to monitor better and manually add it should the log and pos change? -Bryan On Wed, Mar 11, 2009 at 7:05 PM, Baron Schwartz ba...@xaprb.com wrote: That's deprecated too :-) On Wed, Mar 11, 2009 at 9:17 PM, Cui Shijun rancp...@gmail.com wrote: hi, #2. try adding the information of master into my.cnf then restart the server. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=wult...@gmail.com -- Rob Wultsch wult...@gmail.com wultsch (aim) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Replica questions
:S Hi Bryan Actually changing the slave setup after a reboot is a very bad idea, you will have inconsistent data on your slave because every transaction made from when you rebooted the server to when you reset the position will not be copied from the master. Thats the point of the position information, that MySQL can know what data has been replicated and what data has not been. My understanding is that you should never have to reset the binlog position info after initial setup unless you are reinitialising your slave with a new copy of the data from the master because the slave broke for whatever reason. I have several DBs copied to slaves and have never had to reset anything following a reboot of the slave (or master for that matter). If you are finding replication stops after a reboot then I think you have a serious problem, but don't know what that might be. Post some more info and someone on the list can probably help, thanks Andy. Quoting Bryan Irvine sparcta...@gmail.com: The information is there and the replica can connect on a reboot but only if that information has not changed correct? e.g. I reboot the slave, and on the master just run reset master; the bin.01 could change to bin.02 and the pos change from 98 to 15443 or some such. If I do that do I then need to re-run the set master to statements when the slave comes back up? or can that be handled automatically? -Bryan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Replica questions
BTW there is a list specially dedicated to replication configurations: http://lists.mysql.com/replication -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Replica questions
If you are finding replication stops after a reboot then I think you have a serious problem, but don't know what that might be. Post some more info and someone on the list can probably help, just a 'skip-slave-start' in my.cnf does the trick. 2 Is there a way to get a slave to automatically re-connect as the slave without having to know the masters binlog and position? Each time it reboots I have to manually add it back in with the change master to ... command. if you do NOT have 'skip-slave-start' in the my.cnf replication starts automatically, what is the output of SHOW SLAVE STATUS\G after a reboot? if you do not have an empty set and SQL and IO thread are NOT running you probably have 'skip-slave-start' in the config file. Claudio
Replica questions
I've got 2 questions about my newly set up master-slave replica. 1 When I run load data from master; I get an error that I do not have RELOAD privileges and then it boots the slave offline. I've run GRANT SELECT, PROCESS, FILE, SUPER, REPLICATION CLIENT, REPLICATION SLAVE, RELOAD ON *.* TO root@'%' IDENTIFIED BY 'password'; flush privileges; but it still does the same thing. 2 Is there a way to get a slave to automatically re-connect as the slave without having to know the masters binlog and position? Each time it reboots I have to manually add it back in with the change master to ... command. TIA -Bryan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Replica questions
On Wed, Mar 11, 2009 at 4:03 PM, Bryan Irvine sparcta...@gmail.com wrote: I've got 2 questions about my newly set up master-slave replica. 1 When I run load data from master; I get an error that I do not have RELOAD privileges and then it boots the slave offline. I've run GRANT SELECT, PROCESS, FILE, SUPER, REPLICATION CLIENT, REPLICATION SLAVE, RELOAD ON *.* TO root@'%' IDENTIFIED BY 'password'; flush privileges; but it still does the same thing. 2 Is there a way to get a slave to automatically re-connect as the slave without having to know the masters binlog and position? Each time it reboots I have to manually add it back in with the change master to ... command. TIA -Bryan #1. This feature is deprecated. We recommend not using it anymore. It is subject to removal in a future version of MySQL. #2. Replication info should be being recorded on the master.info in your data dir. -- Rob Wultsch -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Replica questions
hi, #2. try adding the information of master into my.cnf then restart the server. thanks 2009/3/12 Bryan Irvine sparcta...@gmail.com: I've got 2 questions about my newly set up master-slave replica. 1 When I run load data from master; I get an error that I do not have RELOAD privileges and then it boots the slave offline. I've run GRANT SELECT, PROCESS, FILE, SUPER, REPLICATION CLIENT, REPLICATION SLAVE, RELOAD ON *.* TO root@'%' IDENTIFIED BY 'password'; flush privileges; but it still does the same thing. 2 Is there a way to get a slave to automatically re-connect as the slave without having to know the masters binlog and position? Each time it reboots I have to manually add it back in with the change master to ... command. TIA -Bryan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=rancp...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Replica questions
That's deprecated too :-) On Wed, Mar 11, 2009 at 9:17 PM, Cui Shijun rancp...@gmail.com wrote: hi, #2. try adding the information of master into my.cnf then restart the server. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org