MySql 設置IP 訪問

##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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章