行业知识
【Mysql】Navicat数据库勿删了mysql.infoschema@localhost,导致打不开数据库,如何修改
2026-10-22 02:28:43
来源:互联网转载
运行报错如下:
1449 . The user specified as a definer ('mysql.infoschema'@'ocalhost') does not exist 该index.php/tags-41973.html" >���法不需要重启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;