Question

I recently created a t1.micro instance running Ubuntu Linux. I then used that instance to create an image that would allow me to clone more instances. Installed LAMP and PHPMyAdmin on the parent instance so naturally, the cloned instance took on those properties as well. It's my understanding that each instance has it's own LAMP server that is autonomous of all other instances' LAMP servers. So, why is it that when a query is executed on the parent instance that it also executes on the cloned instance?

Was it helpful?

Solution

They are completely separate, but chances are you have a connection string somewhere on instance #1 that points to the MySQL database on instance #1.

When you duplicated the instance, the same connection string would exist on instance #2 and it still points to instance #1. If you actually want each instance to have its own separate database, you'll need to make sure the connection string is updated every time it is cloned, (or else it set to the equivalent of 'localhost').

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top