##1.默認安裝目錄
cd C:\Program Files\mysql-5.7.16-winx64\bin
##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