connection.select_db('falsk_covid')放到cursor = connection.cursor()之前去执行
有帮助的话,请点采纳该答案~
mysql没有连上,因此报错了。