将用户中的host改为%
update user set host = '%' where user = 'root';
进行授权
GRANT ALL PRIVILEGES ON *.* TO root@'%';
刷新
FLUSH PRIVILEGES
2022-11-08 07:47:10
update user set host = '%' where user = 'root';
GRANT ALL PRIVILEGES ON *.* TO root@'%';
FLUSH PRIVILEGES