① 查看未作修改前的表, 如图1
mysql> use mysql;
mysql> select host,user from user;
图1
②添加一个root账号
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'admin123' WITH GRANT OPTION;
mysql> flush privileges;
③再查看表,检查是否有变化, 如图2
mysql> select host,user from user ;
图2