1.linux与linux之间
grant all privileges on *.* to root@'xxxxx' identified by '123456';
flush privileges
grant:授权
all:所有权限
*.*:数据库名称.表名称
root:操作mysql的用户
@'':主机名
密码:123456
2.windows访问linux
grant all privileges on *.* to 'root'@'%' identified by 'password';
flush privileges;