MySql 设置IP 访问

##1.默认安装目录
cd C:Program Filesmysql-5.7.16-winx64in

##2.登陆mysql数据库
mysql -uroot -p

##3.查看user表
use mysql;
select host,user from user;

##4.更新IP
update user set host = '172.16.7.136' where user = 'root';

##5.授权
Grant all on *.* to 'root'@'%' identified by 'DKYao2021!@#$' with grant option;
flush prvileges;

##6.重启mysql
net stop mysql
net start mysql

原文地址:https://www.cnblogs.com/roak/p/14963646.html