Skip to content
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

Cannot connect to mysql server in WSL2 from Windows Mysql client #4369

Closed
sonbach opened this issue Aug 2, 2019 · 2 comments
Closed

Cannot connect to mysql server in WSL2 from Windows Mysql client #4369

sonbach opened this issue Aug 2, 2019 · 2 comments

Comments

@sonbach
Copy link

sonbach commented Aug 2, 2019

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Windows 10 v18950
    Ubuntu 16.04LTS in WSL2

  • What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.) Cannot connect to mysql server that is running w/in WSL2 with Mysql client HeidiSQL running in Windows.
    image

It works fine if I run the server in my Ubuntu 18.04LTS WSL1 instance

  • What's wrong / what should be happening instead:
    What's wrong: Cannot connect to mysql server that is running w/in WSL2 with Mysql client HeidiSQL running in Windows.
    What should be happening: Should be able to connect mysql server running in WSL2 from Windows Mysql Client

  • Strace of the failing command, if applicable: (If some_command is failing, then run strace -o some_command.strace -f some_command some_args, and link the contents of some_command.strace in a gist here).

  • For WSL launch issues, please collect detailed logs.

See our contributing instructions for assistance.

@owennewo
Copy link

owennewo commented Aug 2, 2019

This is failing for the same reason as #4353 and @benhillis says they are working on it.

In the mean time you need to get mysqld to bind to 0.0.0.0 and also (probably) do another grant as mysql often has username@ip type grants
Doing a quick google:
https://dba.stackexchange.com/questions/64581/mysql-bind-address-0-0-0-0-in-my-cnf-does-not-work
If the workaround works I'd mark this as a duplicate.

@sonbach
Copy link
Author

sonbach commented Aug 2, 2019

That works!!! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants