windows MySQL8赋予远程连接权限
win+r cmd
回车
mysql -u root -p
输入mysql密码
use mysql;
CREATE USER 'root'@'IP或域名' IDENTIFIED BY '123456';
ALTER USER 'root'@'IP或域名' IDENTIFIED WITH mysql_native_password BY '123456';
grant all privileges on *.* to root@'IP或域名';
flush privileges;
用户名root
密码123456
可自行修改
select user, host from user;
验证账号