mysql> GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "123456";
mysql> flush privileges;
1、赋予账户远程访问权限
2、通过修改
sudo vim /etc/mysql/mysql.conf.d
注释 # # Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1
ok,设置完成。