1.本机登录mysql
mysql -u root -p
输入密码后登录
2.授权
mysql>GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;
mysql>FLUSH PRIVILEGES ;
mysql>exit;
3.通过其他机器连接测试
1.本机登录mysql
mysql -u root -p
输入密码后登录
2.授权
mysql>GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;
mysql>FLUSH PRIVILEGES ;
mysql>exit;
3.通过其他机器连接测试