运行报错如下:
1449 . The user specified as a definer ('mysql.infoschema'@'ocalhost') does not exist
该方法不需要重启mysql,或者重装;仅需要恢复删除的mysql.infoschema@localhost用户
一、登录建立用户
mysql -uroot -p'xxxxxx密码'
二、建立用户
几个注意点:注意引号不要用中文,要有分号结尾
CREATE USER 'mysql.infoschema'@'localhost' IDENTIFIED BY '123456';
三、为用户赋权
GRANT ALL PRIVILEGES ON *.* TO 'mysql.infoschema'@'localhost';
四、使权限生效
FLUSH PRIVILEGES;