设置root使用密码从任何主机连接到MySQL服务器
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
# 如果你想允许用户root从ip为192.168.1.104的主机连接到mysql服务器
GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.3.114' IDENTIFIED BY '123456' WITH GRANT OPTION;
flush privileges;