0

enter image description here

Getting the above error while connecting to mysql server running on WSL. That's weird
because I have done this with postgresql and it worked fine.

But if on the WSL command prompt I type mysql -u root I am able to connect to it.
The Dbeaver or any other window client application or any java program is also giving error

nbk
  • 45,398
  • 8
  • 30
  • 47
paras baluja
  • 3
  • 1
  • 3
  • 1
    What is running where? – RiggsFolly Apr 16 '21 at 16:33
  • windows subsystem for linux – nbk Apr 16 '21 at 16:34
  • I know what WSL is @nbk. I was wondering where the database was running and where these client tools were running – RiggsFolly Apr 16 '21 at 16:38
  • 1
    You have to allow remote access, see: https://stackoverflow.com/questions/50570592/mysql-8-remote-access – Luuk Apr 16 '21 at 16:40
  • 1
    or take a look https://askubuntu.com/questions/1249973/connect-mysql-workbench-to-wsl2 – nbk Apr 16 '21 at 16:43
  • database is running on WSL. And client tools on windows – paras baluja Apr 16 '21 at 16:47
  • I noticed that I could login from WSL only when I run the command - `sudo mysqld --skip-grant-tables &` and then start the mysql otherwise even from inside mysql I get access denied error – paras baluja Apr 16 '21 at 17:01
  • Networking works different on WSL1 and WSL2. If you are using WSL2, the Linux will have a different IP address and you may require some additional configuration. -- Are you running MySQL on WSL2? What is the ip address assigned to the Linux? – Jaime Apr 19 '21 at 23:38

0 Answers0