執行以下命令查看root權限
show grants for 'root'@'localhost';
如果沒有顯示with grant option,說明是root沒有擁有新建授權用戶的權限(為什么會這樣呢,因為我把user='root' and host='localhost'給刪掉了,然后重新授權all privileges給新建root用戶,但是沒有授權with grant option)
然后我們使用localhost登錄再次新建root用戶,一定要在后面增加with grant option;
grant all privileges on *.* to 'root'@'localhost' identified by '123' with grant option;;現在我們再使用root用戶登錄就可以正常新建用戶了