Reputation: 53
So the struggle is to connect to the remote database with ODBC. I followed the guides which I found on the Internet. They told me to make a SSH tunnel because my host doesn't allow direct connections and I made one using PLink (Putty console). I can even login into the database using the console (I have a screenshot but I can't post it due to reputation restrictions).
But when I try to setup MySQL Connector/ODBC Data Source Configuration in the ODBC driver, i get
[08S01] [MySQL][ODBC 3.51 Driver]Lost connection to MySQL server at
'reading initial communication packet', system error: 0
My settings:
TCP/IP Server: localhost [I tried 127.0.0.1 with no result]
Port: 3307
User/Password: I use those which were successful in signing in through console
Database: The list is empty so I cannot choose anything
plink is launched with
Params := '-v -ssh -2 -P 22 -C -l ******** -pw ******* -L 3307:ssh.******.nichost.ru:22 ssh.******.nichost.ru';
So port should be fine. Idk what to do, I googled east and west and found nothing which helped me :( Please help.
Upvotes: 3
Views: 5788
Reputation: 3805
I don't understand your port forwarding setup. You're using
-L 3307:ssh.******.nichost.ru:22
which makes port 3307 at your end behave as if it were port 22 at the remote end; but port 22 typically belongs to an ssh server, not a database server.
If your MySQL server is listening on port 3307 at the remote end, you'd need -L 3307:ssh.******.nichost.ru:3307
to connect to it via port 3307 at your end.
Upvotes: 3