Open sushitommy opened 9 years ago
Why would you use different connections for different databases? It is not required to specify a database in the connection settings.
Ow I mean different mysql servers! On Aug 27, 2015 7:00 PM, "Ben Green" notifications@github.com wrote:
Why would you use different connections for different databases? It is not required to specify a database in the connection settings.
— Reply to this email directly or view it on GitHub https://github.com/numtel/meteor-mysql/issues/31#issuecomment-135493105.
If you have different templates that have to connect to different mysql databases. What's the best approach to (re)use multiple liveDB instances?
Right now I'm using option 1: I use the Template.OnDestroyed function to stop the mysql connection if a user navigates away from the page where it's used. However, I'm also using a dynamic subscription which also calls the same subscription.stop(). So on every change, a new liveDB connection object is created. What are your ideas?