1

So I am facing this problem,whereby,whenever I stop my MySql server(which is using an EC2 free-tiered micro instance), I would have my non-root users passwords changed!! by itself.

I need to reset their respective passwords everytime I stop and reboot my MySql EC2 instance.

Piyush Patil
  • 14,512
  • 6
  • 35
  • 54
techfang
  • 97
  • 7
  • You need to reburn an AMI version. It is like saying, I inserted a row, then I abandoned the memory image, and started over. Now where is that new row? – Drew Aug 07 '16 at 16:56
  • 1
    Are you only stopping your EC2 instance, or are you terminating it? – Matt Houser Aug 07 '16 at 18:30
  • 1
    How are you shutting down the instance? From the instance itself using the OS shutdown, or from the AWS console/cli? Stopping and rebooting should not be losing data on EBS-backed volumes (which t1/t2.micros are) unless the InstanceInitiatedShutdownBehavior instance attribute has been modified from its default. – Karen B Aug 08 '16 at 00:04

1 Answers1

2

See the following screenshot:

enter image description here

Perform the Image / Create Image functionality. Give it a meaningful image name and description. For description, help yourself later by being as verbose as possible like "from 20160401 build plus Scala 2.12 and vsfptd configured". The request to save the custom AMI will be received and may take a short time to complete. Typically when you are just starting with small instances, it will be completed in a few minutes. When completed, it will be visible in the left pane under Images / AMIs.

See the AWS Manual page entitled Step 3: Deploy Your App at the bottom. The section "Create a Custom AMI".

enter image description here

In short, without saving your work and the current state of your server, all work is lost by a stop and reboot. You need to manage, cleanup, and discard prior AMI instances that cause confusion later. That is why the description field is your best friend. Naturally only discard things not of value.

Drew
  • 24,851
  • 10
  • 43
  • 78
  • Thanks Drew, I actually knew about the "create image" thing. However, putting an instance to a stop have its own advantage in terms of cost. They don't charge for "stopped" instance. They, however, charge for the amount of AMIs you got. Thx. – techfang Aug 07 '16 at 17:34
  • True, but you get an allocation up to like 16GB storage or something for free in that tier. After the first year, $1 gets you 72 hours of use at micro with 1GB RAM. The price is double for small at 2GB RAM. So, I just don't buy coffee at Starbucks as much. – Drew Aug 07 '16 at 17:34