GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘ IDENTIFIED BY ‘root‘ WITH GRANT OPTION;報錯

Tony.Jia發表於2024-12-01

mysql8中已經不支援grant all privileges on *.* to 'root'@'%' identified by '密碼' with grant option這種寫法。

透過下面三個步驟解決問題:

步驟一:
CREATE USER 'root'@'%' IDENTIFIED by '*';
步驟二:
grant all privileges on *.* to 'root'@'%' ;
步驟三:
FLUSH PRIVILEGES;

相關文章