mysql設定指定ip遠端訪問連線的方法

2022-07-20 09:45:11 字數 580 閱讀 8051

1. 授權使用者root使用密碼jb51從任意主機連線到mysql伺服器:

複製** **如下:

grant all privileges on *.* to 'root'@'%' identified by 'jb51' with grant option;

flush privileges;

2.授權使用者root使用密碼jb51從指定ip為218.12.50.60的主機連線到mysql伺服器:

複製** **如下:

grant all privileges on *.* to 'root'@'218.12.50.60' identified by 'jb51' with grant option;

flush privileges;

grant all privileges on *.* to abc@'192.168.2.%' 即可。

grant all privileges on *.* to abc@'192.168.%' 即可。

或者grant all privileges on *.* to abc@'192.168.%' 即可。'192.168.0.0/255.255.0.0'

mysql設定指定ip遠端訪問連線例項

這篇文章主要介紹了mysql設定指定ip遠端訪問連線的方法,分別例項講述了從任意主機和指定ip訪問遠端mysql資料庫的方法,簡單功能實用,需要的朋友可以參考下 1.授權使用者root使用密碼jb51從任意主機連線到mysql伺服器 grant all privileges on to root i...

mysql設定指定ip遠端訪問連線例項

1.授權使用者root使用密碼jb51從任意主機連線到mysql伺服器 複製 如下 grant all privileges on to root 程式設計客棧 identified by jb51 with grant option flush privileges owkwl 2.授權使用者ro...

mysql資料庫指定ip遠端訪問

1.登入 mysql u root p 之後輸入密碼進行登陸 2.許可權設定及說明 2.1新增遠端ip訪問許可權 grant all privileges on to root 192.168.199.99 identified by fefjay with grant option flush p...