![]() ![]() Hopefully this helps someone, but it should be noted that sshtunnel seems to work a lot better in later versions of python, >3. Pass # This is very dodgy but the multi=True doesn't work So here is my hack solution which works? sqlfile = open('someimport.sql', mode="rb")Įxcept : Your URI consists of your SSH user name, the SSH host name, and the port number on which the host listens. ![]() In the SSH Tunnel tab, do the following: Specify a valid URI in the SSH URI field. Mainly I’ve found if you’re reading from a file you need to load the file outside of the ssh tunnel, Also when using the cursor, using multi=true will not import your data and will result in an Interface error. In the Basic tab, enable Connect SSH Tunnel. The Secure Shell forwarding, or SSH, can be used for data forwarding. But there is some limitation, the mysql connector doesn’t work as expected in this configuration (I’m using python 3.5.2, mysql-connector-python 8.0.21 and sshtunnel 0.1.5). There is one more way to tunnel network traffic. sudo apt-get install python-mysqldb how would we find the name of the package. In that case set portserver.localbindport. I deleted my comment yesterday because I needed to test this solution some more, but I’ve found that enabling the use_pure option on the mysql connector will get it to work. SSH tunnel: specify use SSH tunnel, hostname yourserver, port 22. If you dont specify localbindaddress in sshtunnel.SSHTunnelForwarder, the local port is allocated randomly. ![]()
0 Comments
Leave a Reply. |