I\'m trying to connect to MySQL on localhost using PyMySQL:
import pymysql conn = pymysql.connect(db=\'base\', user=\'
I met the same question and my solution is as follows:
ssh -fN -L 3307:mysql_host:3306 ssh_user@ssh_host
conn = pymysql.connect(db='base', user='root', passwd='pwd', host='localhost')
This error occurs because database does not support link directly.