grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
第一个root表示用户名,%表示所有的电脑都可以连接,也可以设置某个ip地址运行连接,第二个root表示密码。
flush privileges;
命令立即生效。
grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
flush privileges;