Docker Storage Lab Error

Though the container is created but the sh get-data.sh gives below error:

$ sh get-data.sh
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1146 (42S02) at line 1: Table ‘foo.myTable’ doesn’t exist

Hi @anujmittal42

Check:

sh data

Sorry for the delay.

Hope this helps.

1 Like

this error war reported 5 years ago, and still is not fixed till today,

quiet disappointing guys

Did you actually do the lab? I just did. Whole thing worked, flawlessly. GUESSING SOMEBODY FIXED IT :slight_smile:

Why did you think this was not fixed?

I think it happened bc it happened
ERROR 1146 (42S02) at line 1: Table ‘foo.myTable’ doesn’t exist

I don’t know How could I prove that, But you can take my word for it

Read the lab. When they should the data disappearing, it’s because the lab script has deleted the container, very simply. You saw it because it was supposed to happen.

  • The container disappears.
  • You run the get-data.sh script, and it errors out because the container is gone.
  • And if you didn’t create a volume mapping, the data disappears with it.
  • They have you create a new container, which maps /var/lib/docker out of the container into /opt/data on the host.
  • Now you use get-data.sh again – no error, but no data.
  • They restock the data in the container.
  • Now data is written to the host, so when they…
  • …delete the container again, and you recreate the container…
  • …the data is automagically there when you re-run get-data.sh, without them restocking the container.

So do the lab, the whole lab. Please read the task info in the labs – this is explained. So not a bug. They are deliberately causing the error by removing the container. Continue with the lab, you’ll see for yourself.