replace pymysql with MySQLdb
fix nodecmp syntax error