解决办法一:
1.cmd
2.c:\Users\Administrator>cd c:\Program Files\MySQL\MySQL Server 5.7\bin
3c:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -h localhost -u root -p
4.Enter password: 数据库密码
5.use 表名;
6.set global optimizer_switch='derived_merge=OFF';
7.终于成功!
解决办法二:
1. 运行services.msc,重启MySQL服务.
2. 在MySQL运行一下命令: use mydbname; set global optimizer_switch='derived_merge=OFF';
3. 重新生成 .edmx