Access denied error in trying to connect to a MySQL db in Python
You seem to be trying to make an SSH tunnel, but I don't think you're actually using that tunnel for the mysql connection? 

I also suspect the mysql error you receive is from a local mysql server, not the remote one you're trying to connect to. 

I think you need to do port forwarding and use that port for the mysql connection. See e.g. Enable Python to Connect to MySQL via SSH Tunnelling (stackoverflow.com) or research making SSH tunnels in Python for MySQL connections.