解决:
shell
mysql -u root -p
输入密码登录mysql服务器,那个ip是本机ip4的地址单ip放行。推荐全部,后面123456是密码
sql
GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.0.109' IDENTIFIED BY '123456';
全部IP都放行
sql
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
刷新权限
sql
FLUSH PRIVILEGES;