(win環境)Mysql Error:The user specified as a definer (‘mysql.infoschema’@’localhost’) does not exist’
阿新 • • 發佈:2019-01-10
網上的了類似問題:
The user specified as a definer ('root'@'%') does not exist
解決方法:
mysql -u root -p 你的密碼 mysql>grant all privileges on . to [email protected]”%” 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