Mysql授權遠端訪問

2021-06-22 09:58:56 字數 592 閱讀 1012

mysql授權遠端訪問

在安裝mysql的機器上執行: 

1、d:\mysql\bin\>mysql -h localhost -u root 

//這樣應該可以進入mysql伺服器 

2、mysql>grant all privileges on *.* to 'root'@'%'with grant option 

//賦予任何主機訪問資料的許可權 

例如,你想myuser使用mypassword從任何主機連線到mysql伺服器的話。 

grant all privileges on *.* to 'myuser'@'%'identified by 'mypassword' with grant option; 

如果你想允許使用者myuser從ip為192.168.1.6的主機連線到mysql伺服器,並使用mypassword作為密碼 

grant all privileges on *.* to 'myuser'@'192.168.1.3'identified by 'mypassword' with grant option; 

3、mysql>flush privileges 

**:

Mysql授權遠端訪問

在安裝mysql的機器上執行 1 d mysql bin mysql h localhost u root 這樣應該可以進入mysql伺服器 2 mysql grant all privileges on to root with grant option 賦予任何主機訪問資料的許可權 例如,你想m...

MySQL授權遠端訪問

1 mysql h localhost u root 這樣應該可以進入mysql伺服器 2 grant all privileges on to root with grant option 賦予任何主機訪問資料的許可權 例如,你想myuser使用mypassword從任何主機連線到mysql伺服器...

MySql授權使用者遠端訪問

建立了乙個mmroot的使用者,密碼為mm1234 表示資料和表 表示所有的ip都可以訪問 即可以遠端訪問 all privileges表示所有的許可權 with grant option表示授權使用者的許可權 例項 mysql grant all privileges on to mmroot i...