mysql -u root -p // 在下一行输入密码
grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
flush privileges;
select host,user from user;
完整版