Fixed #22391: use pymysql if MySQLdb not available.