grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
解释: grant [权限] on [database.table] to [用户名]@[IP] identified by [密码];
flush privileges; //刷新权限
select host,user from user;