DEV Community

kevinGit777
kevinGit777

Posted on

connect to wsl mysql from host windows with MySQL Workbench

source: https://stacktuts.com/how-to-connect-to-wsl-mysql-from-host-windows

To solve the problem of fail to connect to localhost, the last method is the only one work for me.
Set the bind-address = 0.0.0.0 in mysql configuration. I did create an extra inbound rule in the host machine, but not sure if that is optional.

The next problem is

host 'ComputerID' is not allow to connect to this MySQL server
.
I grant the privileges for the username I created for the project using
grant all privileges on *.* to 'user_name'@'host_ip_address' Identified by 'password' with grant option;

And I can connect to the SQL now! :)

Top comments (0)