docker/getting-started

Recommend adding instructions to explicitly start mysql within tutorial

JLivingston01 opened this issue · 2 comments

On Windows 10 powershell, working through the tutorial. I notice this behavior when following the tutorial as written:

PS C:\Users\jliv\app\app> docker exec -it frosty_buck mysql -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

After running step 2 of starting-mysql (http://localhost:81/tutorial/multi-container-apps/#starting-mysql), mysql is not actually started yet. Before entering the mysql terminal (step 3), I needed to start mysql with a command not in the tutorial:

PS C:\Users\jliv\app\app> docker exec -it frosty_buck mysql start -p secret
mysql Ver 8.0.31 for Linux on x86_64 (MySQL Community Server - GPL) Copyright (c) 2000, 2022, Oracle and/or its affiliates. ...

After starting mysql, all is well. Is it worth adding instruction to start mysql explicitly in the tutorial? Curious if anyone has run into this on their machines as well.

Thanks @JLivingston01 for creating an issue and sharing your trouble!

When running the MySQL container, it should definitely be starting itself. So, there's definitely something going on there worth further investigation. Curious... is it reproducible for you? If so, can you share the steps so we can try it ourselves?

Closing due to inactivity. If you're still experiencing the problem, feel free to comment and reopen the issue