I was following the Accessing your MySQL database from outside PythonAnywhere guidelines and i am getting the error below
2021-10-19 13:02:38,943| ERROR | Secsh channel 0 open FAILED: open failed: Administratively prohibited
2021-10-19 13:02:38,943| ERROR | Could not establish connection from local ('127.0.0.1', 62213) to remote ('lewisMachilika.mysql.pythonanywhere-services.com', 3306) side of the tunnel: open new channel ssh error: ChannelException(1, 'Administratively prohibited')
Below is my file
import MySQLdb
import sshtunnel
sshtunnel.SSH_TIMEOUT = 5.0
sshtunnel.TUNNEL_TIMEOUT = 5.0
with sshtunnel.SSHTunnelForwarder(
('ssh.pythonanywhere.com'),
ssh_username='xxxxx', ssh_password='xxxxxx',
remote_bind_address=('xxxxxxxx', 3306)
) as tunnel:
connection = MySQLdb.connect(
user='xxxxxx',
passwd='xxxxx',
host='127.0.0.1', port=tunnel.local_bind_port,
db='xxxxxx',
)
# Do stuff
connection.close()