Can't connect through SSH tunnel
the-noob opened this issue · 1 comments
the-noob commented
Using WSL, I've added a port forwarding to my SSH connection and connection works from a GUI (HeidiSQL) and also from CLI
LocalForward 3326 localhost:3306
mysql -uX -P3326 -h127.0.0.1 -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 334416
Using the same credentials and port in my app I get
[error] MyXQL.Connection (#PID<0.1827.0>) failed to connect: ** (MyXQL.Error) (1044) Access denied for user 'X'@'localhost' to database
Anything I can do to debug further?
the-noob commented
After posting I thought about something, obviously.
Running iex -S mix
and then doing {:ok, pid} = MyXQL.start_link(hostname: "127.0.0.1", username: "Xport: 3326, password: "x")
works so it's something with the initial config (done through .env)