從另外一台伺服器拷貝了個mysql執行個體過來,給root@'%'授權的時候提示ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES),以前5.6->5.7的時候,确實執行下mysql_upgrade一般就好了。但是拷貝的直接就是5.7,是以不是這個問題。
執行show grants for [email protected]發現沒有with grant option權限
于是執行use mysql;
update user set grant_priv = 'Y' where user='root' and host='127.0.0.1'
flush privileges;
再執行,有權限了。
花若盛開,蝶自飛來,你若精彩,幸福開懷!2020年12月11日-18日