文章目录 1. 事故现场2. 事故原因3. 解决方法 1. 事故现场 在.net 5.0的项目中,使用Mysql.Data来连接mysql,结果报错: The given key ‘16706’ was not present in the dictionary 2. 事故原因 由于mysql升级,导致Mysql.Data的版本与mysql的版本不一致导致; 之前mysql的版本为8.0.25,Mysql.Data的版本为8.0.27; 之后mysql的版本为8.0.30; 3. 解决方法 升级Mysql.Data版本到8.0.30;