jeger003 Posted January 28, 2013 Share Posted January 28, 2013 hello, I don't like the fact that there is a connection open 24/7 from slave to master. I want to specify a time of the day to open a connection and test whether there are any updates. Is this possible? Link to comment https://forums.phpfreaks.com/topic/273747-how-to-only-open-connection-to-slave-from-specified-time/ Share on other sites More sharing options...
requinix Posted January 28, 2013 Share Posted January 28, 2013 What are you talking about? Replication? Persistent connection for something? Link to comment https://forums.phpfreaks.com/topic/273747-how-to-only-open-connection-to-slave-from-specified-time/#findComment-1408813 Share on other sites More sharing options...
jeger003 Posted January 29, 2013 Author Share Posted January 29, 2013 I'm referring to Replication. Link to comment https://forums.phpfreaks.com/topic/273747-how-to-only-open-connection-to-slave-from-specified-time/#findComment-1408952 Share on other sites More sharing options...
jeger003 Posted January 29, 2013 Author Share Posted January 29, 2013 any ideas? Link to comment https://forums.phpfreaks.com/topic/273747-how-to-only-open-connection-to-slave-from-specified-time/#findComment-1408993 Share on other sites More sharing options...
requinix Posted January 29, 2013 Share Posted January 29, 2013 You do have a technical reason why you don't want the connection, or just "don't like it"? If the latter then I'm going to try to convince you that it's not a problem and you should just leave it be. Link to comment https://forums.phpfreaks.com/topic/273747-how-to-only-open-connection-to-slave-from-specified-time/#findComment-1409005 Share on other sites More sharing options...
jeger003 Posted January 29, 2013 Author Share Posted January 29, 2013 well does it slow anything down to have a constant connection open? thats my main reason of closing it off. Also I have an event that runs once a day to update the MASTER. So in the entire day the MASTER has activity only once! Link to comment https://forums.phpfreaks.com/topic/273747-how-to-only-open-connection-to-slave-from-specified-time/#findComment-1409016 Share on other sites More sharing options...
requinix Posted January 29, 2013 Share Posted January 29, 2013 It doesn't slow anything down. The slave waits and waits and waits until the master sends information. Meanwhile the process just sleeps, consuming no resources. Link to comment https://forums.phpfreaks.com/topic/273747-how-to-only-open-connection-to-slave-from-specified-time/#findComment-1409025 Share on other sites More sharing options...
jeger003 Posted January 30, 2013 Author Share Posted January 30, 2013 Thanks! what about this issue? I get this error when I run a query: Error 'Table 'rdb.rest' doesn't exist' on query. Default database: 'ftd_store'. Query:... when I run this: INSERT INTO ftd_store.sdnt(dom,art,ttl,ttl_count,last_updated) SELECT * FROM ( SELECT dom,art,ttl,COUNT(OKey) AS ttlCount, NOW() FROM rdb.rest WHERE dom = dom_val GROUP BY art,ttl ORDER BY dom,ttlCount DESC LIMIT 200 ) aliasResults ON DUPLICATE KEY UPDATE ttl_count = ttlCount, last_updated = NOW(); Link to comment https://forums.phpfreaks.com/topic/273747-how-to-only-open-connection-to-slave-from-specified-time/#findComment-1409140 Share on other sites More sharing options...
kicken Posted January 30, 2013 Share Posted January 30, 2013 Pretty self explanatory: Table 'rdb.rest' doesn't exist. You're attempting to query a table called rest in a database named rdb, but it doesn't exist. Link to comment https://forums.phpfreaks.com/topic/273747-how-to-only-open-connection-to-slave-from-specified-time/#findComment-1409170 Share on other sites More sharing options...
jeger003 Posted January 31, 2013 Author Share Posted January 31, 2013 db ftd_store is being replicated and rdb is not. It seems to be sending the query to the SLAVE and that db does not exist on the SLAVE. Link to comment https://forums.phpfreaks.com/topic/273747-how-to-only-open-connection-to-slave-from-specified-time/#findComment-1409328 Share on other sites More sharing options...
fenway Posted February 9, 2013 Share Posted February 9, 2013 That's because you're not supposed to write statements that refer to multiple databases when using replication -- it's just asking for trouble, and it's well documented. As for the slave thread, the whole point is to keep the lag to a minimum -- don't try and mess with it. Link to comment https://forums.phpfreaks.com/topic/273747-how-to-only-open-connection-to-slave-from-specified-time/#findComment-1411236 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.