(win环境)Mysql Error:The user specified as a definer (‘mysql.infoschema’@’localhos

190 阅读1分钟

网上的了类似问题: 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\bin mysql -u root -p mysql> SET GLOBAL innodb_fast_shutdown = 1;

mysql>\q C:\Program Files\MySQL\MySQL Server 8.0\bin mysql_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