The command line connection initiated locally. From my local terminal I can ssh into server A and then enter server B. DB on server B is accessible only from server A via login password. The servers are custom install.
Current CTO exploring entrepreneurship on the side; coach; mentor; instructor.
Dedicated to promoting digital literacy and ideological diversity in tech.
It sounds like you're connecting to server A via ssh, then connecting to server B via ssh, and then connecting to the database from the command line on server B.
If this is true, then this won't be an effective troubleshooting step.
Instead, ssh into server A, and then try to connect to the database server (not the computer it's running on) via the mysql command line on server A.
ssh into server A
run mysql -h IP_ADDRESS_OF_SERVER_B -u MYSQL_USERNAME -PPASSWORD
Note that there is no space between the -P and the password. A live example might look like: mysql -h 35.123.0.10 -u myUser -PreallySecurePassword123
If you can connect successfully using the above, then your connection details in your code (through your ORM/DB configuration) are wrong.
If you can't connect using the above, then there are network issues like a firewall that is blocking traffic either incoming or outgoing between server A and server B.
Your next step would be to troubleshoot that by reviewing the networking setup of those two machines, using pings or traceroutes as a starting point.
Yes, it seems the code part has issues. CMD ssh and mysql part were done the way you said and they worked. Thanks a lot and will come back with more questions if needed!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The command line connection initiated locally. From my local terminal I can ssh into server A and then enter server B. DB on server B is accessible only from server A via login password. The servers are custom install.
It sounds like you're connecting to server A via ssh, then connecting to server B via ssh, and then connecting to the database from the command line on server B.
If this is true, then this won't be an effective troubleshooting step.
Instead, ssh into server A, and then try to connect to the database server (not the computer it's running on) via the mysql command line on server A.
If you can connect successfully using the above, then your connection details in your code (through your ORM/DB configuration) are wrong.
If you can't connect using the above, then there are network issues like a firewall that is blocking traffic either incoming or outgoing between server A and server B.
Your next step would be to troubleshoot that by reviewing the networking setup of those two machines, using pings or traceroutes as a starting point.
Yes, it seems the code part has issues. CMD ssh and mysql part were done the way you said and they worked. Thanks a lot and will come back with more questions if needed!