前几天自己想搭一个简单的ssm框架,用到了mysql数据库,下载安装配置完成后出现了Mysql Error:The user specified as a definer (‘mysql.infoschema’@’localhost’) does not exist’)这样的错误,研究了很多,热门解答都无法解决我的问题。网上的类似问题: The user specified as a definer (‘root’@’%’) does not exist解决方法: mysql -u root -p 你的密码 mysql>grant all privileges on . to root@”%” identified by “你的密码“; flush privileges;但是你会遇到以下问题:check the manual that corresponds to your MySQL server version for the right syntax出现这个问题的原因可能是:字段名可能包含mysql关键字所以推出另一种解决办法以绕过上述问题:从DOS进入MYSQL数据库C:\Program Files\MySQL\MySQL Server 8.0\binmysql -u root -pmysql> SET GLOBAL innodb_fast_shutdown = 1; mysql>\qC:\Program Files\MySQL\MySQL Server 8.0\binmysql_upgrade -u root -p如果最后一条命令执行,出现这样的报告 This installation of MySQL is already upgraded to 8.0, use –force if you still need to run mysql_upgrade则将最后一条命令改为: C:\Program Files\MySQL\MySQL Server 8.0\binmysql_upgrade -u root -p –force