New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in gitpod/workspace-mysql #321
Comments
Thank you for providing such detailed information about your setup, this is very helpful to investigate this bug. At first glance, I'm slightly suspicious about the tasks in your
It seems that you are "racing" Maybe the fix is to just replace the second |
Ok, my proof-of-concept repository https://github.com/jankeromnes/gitpod-mysql is now able to reproduce the problem:
This looks like a timing issue where I've been able to resolve this problem by simply waiting for port
See also jankeromnes/gitpod-mysql@3754992 |
Hi @jankeromnes and many thanks for your great investigation. I added
Ok, maybe I misunderstood the documentation at this Point. The idea was to run I think, I will take a look at the docs again. ;) |
Awesome! Thanks for confirming that this resolved the issue. 🙂 🙌
Maybe the docs are a bit confusing, but this: tasks:
- init: ./setup.sh
- before: wget https://get.symfony.com/cli/installer -O - | bash
command: export PATH="$HOME/.symfony/bin:$PATH" && symfony server:start will:
On the other hand, this: tasks:
- init: ./setup.sh
before: wget https://get.symfony.com/cli/installer -O - | bash
command: export PATH="$HOME/.symfony/bin:$PATH" && symfony server:start will:
As you can see, only the first workspace start has different behaviors, because Hope this clarifies this a tiny bit. 😇 |
Thank you for your further explanations, @jankeromnes. 👍 I'll try this out in the near future. |
Hi,
unfortunately we can't connect to our MySQL server when initializing our workspace while using
gitpod/workspace-mysql
docker image.We have this in our
.gitpod.Dockerfile
:Our
gitpod.yml
In
setup.sh
we are trying to install our databases:When the node is trying to install our databases we get an error in the terminal output:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
If we are running the above commands after initialization is finished, everything works as it should:
Was there anything changed on GitPod or is there something we did wrong? We're pretty sure it worked not too long ago.
Many thanks for your awesome application by the way. 👍
The text was updated successfully, but these errors were encountered: