-
Notifications
You must be signed in to change notification settings - Fork 722
"Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'" #6842
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
Comments
Also seeing this on the Container-based Ubuntu Trusty Public Beta ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Reference #5695 |
Thanks @photodude. Didn't realize infrastructure changes rolled out today. |
@danielbachhuber Looks like your running Trusty beta. drop |
@photodude Right. Can we expect the issue to be fixed any time soon, or should I revert in all of the relevant places? |
I would revert for now for live repos needing to do continuous testing since Trusty is beta. Test your repo with trusty beta in a separate repo and plan to migrate some time after Q1-17 when it's officially released. Trusty likely doesn't benefit you unless you need something like HHVM 3.9+ (current hhvm is 3.15) which is trusty specific. |
👍 Thanks for your help, @photodude |
You are welcome @danielbachhuber, Glad your up and testing again. Hopefully the trusty issues can be sorted out soon (I'm hoping it will be faster for testing HHVM) PS Please keep this issue open until it's resolved on Container-based Trusty Beta. |
I symlinked the socket and it works provided you have sudo required in your .travis.yml
|
@lesterchan symlinking the socket like that doesn't work on the Container-based Trusty Beta as sudo is disabled on the Containers. |
@photodude ops, yeap forgot to add that. You will get the socket error regardless whether you are using container-based trusty or not. For me, I have sudo required and hence it is not a container-based trusty. So the symlink works for me.
|
@danielbachhuber We could shim it for the time being: alias mysql='mysql --socket=/run/mysql-5.6/mysqld.sock' |
@lesterchan I have no issue with the socket on sudo required trusty. For me this is an issue only with the Container-based Trusty Beta. |
I'm facing the same issue. Fixed it by installing and using MySQL 5.6: addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6 But along with it we must change user to |
This:
didn't work for me. Gives the same error:
I checked the contents of both /run and /var/run folders with |
Please see our successful builds https://travis-ci.org/wp-cli/wp-cli/builds/174754228 +36204242498 On November 11, 2016 6:17:50 AM CET, Alexey Rogachev notifications@github.com wrote:
|
To continue using MySQL 5.5 and prevent upgrading to 5.6 I installed addons:
apt:
packages:
- mysql-server-5.5 Now the error is gone. As a temporary fix this is OK, but I hope it will be fixed in a better way, for example by having this package installed by default. Also, even it's MySQL 5.5, we can't use
So additionally it needs to be replaced with |
@arogachev I installed mysql 5.6 since that is how I have sudo required trusty set up and working. Already using mysql root as that is required for the sudo required trusty, I only changed the lines to switch to the Container-based Trusty Beta. This is a Container-based Trusty Beta specific issue @szepeviktor 's suggestion of aliasing the socket does work arround this issue, but reveals the issue noted in #6853 |
@szepeviktor for your workaround on wp-cli you have to also specify Additionally, I noticed with the alias workaround there are PDO issues PDOException: SQLSTATE[HY000] [2002] No such file or directory |
@photodude Maybe there are some nuances on Container-based Ubuntu Trusty, but I get the same error on Standard Ubuntu Trusty using config: dist: trusty
sudo: required Without additional installation I mentioned above the error persists. |
@arogachev we do not have this issue on sudo required trusty for Joomla or with doctrine dbal (note only hhvm is tested via sudo required trusty) I'm only seeing this issue with Container-based Trusty Beta. Is this a new issue you are seeing on sudo required trusty or something from a while back? |
@arogachev I ran a new test, I can confirm what you are seeing in sudo required trusty. Seems to be in issue if the group is not set to edge group: edge Although I'm still getting a related |
…/run/mysqld/mysqld.sock'" travis-ci/travis-ci#6842
Travis support indicates that this should no longer be an issue with the latest Trusty builds... we'll test and see. |
Started 3 builds and one of them failed like this. See for yourself: https://travis-ci.org/kiklop74/moodle-local_xray/jobs/255790946 |
Until this is fixed: travis-ci/travis-ci#6842
Until this is fixed: travis-ci/travis-ci#6842
Also seeing this having been switched over to Trusty. I don't really understand why Travis bumped everyone to Trusty without resolving this issue first, since I have to imagine it will affect so many users. I've just switched back to Precise with |
Just fought a bit with this. Here was our solution: Ensure:
... is present in your
... annnnd... if you want to ensure that the service had enough time to spin up before you start interacting with it, you might give something like this a go:
|
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues |
For wikimedia/mediawiki, containers ( |
Suddenly seeing these errors again... anybody else having issues with this? |
@benpbolton's solution seems to just leave some builds in a hung state, e.g. this one. Mysql service never comes up. Didn't have this issue until yesterday. |
Seems to have fixed itself, not seeing any more failures. |
Never mind, still happening. Is no-one else having this issue? Really annoying to have to restart builds all the time. |
hey @shioyama , we definitely haven't run into this in the last year or so :( Perhaps suspect odd behavior for postgres vs mysql env? Eg. perhaps the mysql service doesn't launch when
is just looping forever in that context. You could test if $DB == mysql before waiting for it if that was helpful |
No the hung state happens on mysql builds... but thanks for the idea. For now I'll just see if it goes away naturally or if it will require manual intervention 😖 |
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue in 24 hours. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues |
Hey we were having the same issue since yesterday. After some investigations it appears that the ubuntu trusty isn't somehow the default OS used for builds. The one used by default seems to be Ubuntu Xenial. Using :
in your .travis.yml fixed this issue (after |
https://travis-ci.community/t/prs-started-failing-on-6-12/3707/2 We are moving to Xenial as the default, and we do not start DB by default. https://blog.travis-ci.com/2019-04-15-xenial-default-build-environment#1-services-support You need to explicitly instruct that it is needed. services:
- mysql |
My builds are failing on this error:
See https://travis-ci.org/wp-cli/wp-cli/jobs/174318358 for a representative job.
This issue is specific to Travis CI and new within the last ~8 hours. Happy to help debug further if you'd like to point me in a direction.
The text was updated successfully, but these errors were encountered: