Open odubuc opened 2 years ago
Adding more information to this issue: I'm getting the exact same problem using SSH2 directly to database server, and connecting mysql2 on localhost. mysql2 initiate the TLS handshake and doesn't seem to complete. same debug output.
Using the answer from this code on StackOverflow, I've successfully connected and executed queries using SSH2 as a jump host and a plain ( non ssl ) mysql2 connection. When looking up on the server, I can see my user connection as plain "TCP/IP" which is good for the test.
However, if I specify the SSL information in the "createConnection" function, when the code hits "execute", it hangs without any errors. On the MySQL server, I can see the user seems to be connected with a state of "sleep". connection type is "SSL/TLS" so the connection seems to be established but I cannot figure out why the code hangs.
( Of course if I connect directly without SSH2, TLS establishes without any issues and the query execute immediately ).
This is the code used. To make this work or fail, simply comment the ssl object and it will pass. otherwise it will hang at sql.execute
( note : In my tests, the jump host and mysql are on two seperate machines. )
Enabling debug: true only gives me this output.