启动mysql命令符
grant all privileges on mysql.* to 'root'@'%' identified by '123456';
给mysql用户root授权,'%'表示外部IP,如果是本地,把'%'改成'localhost',localhost包含了127.0.0.1
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY '123456' WITH GRANT OPTION;
对root远程访问授权所有数据表