1. 程式人生 > >ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not exist

ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not exist

Mysql Error:The user specified as a definer (‘mysql.infoschema’@’localhost’) does not exist’ when trying to dump tablespaces

我的MYSQL 使用Docker進行部署的,當我進行版本升級(MySQL 5.7 to MySQL 8.0)之後,嘗試進行連線的時候就會報這個錯誤。

解決辦法:
(來源https://dev.mysql.com/doc/refman/8.0/en/upgrading-strategies.html)


mysql> SET GLOBAL innodb_fast_shutdown = 1; //可不需要
mysql_upgrade -u root -p

其實主要是因為在my.cnf配置檔案中skip_name*****跳過了域名解析並且刪除掉了user表中所有localhost為地址的使用者

而升級則是把這些使用者重新添加了回來