xo / usql

Universal command-line interface for SQL databases
MIT License
8.82k stars 346 forks source link

invalid port ":59197)" after host #396

Closed maretodoric closed 1 year ago

maretodoric commented 1 year ago

Hello,

I've been getting following error message when trying to establish connection to MySQL Server.

parse "mysql://user:pass.@tcp(localhost:59197)/dbname?autocommit=true": invalid port ":59197)" after host

Using usql version 0.13.8 on Windows Server 2019. I understand port is little strange. It's because i opened dynamic SSH tunnel from remote host to local host and I'm connecting to dynamically assigned port. Using same method for mssql server works (of course, using different dsn).

Could it be due to 5 digit port?

kenshaw commented 1 year ago

Try mysql://user:pass@localhost:59197/dbname?autocommit=true