Score:0

Accessing remote database from Windows machine

jp flag

I tried to connect to a remote MySQL instance from my script in WSL2 but it always failed. I tested using the following command Test-NetConnection -ComputerName my-db.com -Port 3306 from PowerShell v7 and got this result:

ComputerName           : my-db.com
RemoteAddress          : 123.123.123.123
RemotePort             : 3306
InterfaceAlias         : Wi-Fi
SourceAddress          : 192.192.192.192
PingSucceeded          : False
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded       : False

I've checked the firewall rules and I don't see any rule regarding port 3306. I've tried using VPN too to no avail. I'm really at my wit's end.

EDIT: And yes, the remote server is open on that port because I can connect to it using MySQL Workbench.

in flag
Most probably the database does not allow remote connections.
Dorklord avatar
jp flag
I forgot to mention. I can connect just fine using MySQL Workbench. @GeraldSchneider
in flag
Then compare the settings. You are not even providing enough information to guess.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.