遠端使用者連線mysql授權

2021-09-02 16:06:52 字數 617 閱讀 9141

在安裝mysql的機器上執行: 

1、mysql -u myuser -p ***xx 

//進入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 

//修改生效 

4、mysql>exit 

//退出mysql伺服器,這樣就可以在其它任何的主機上以root身份登入 

遠端使用者連線mysql授權

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

mysql遠端連線授權

mysql is not allowed to connect to this mysql server 如果你想連線你的mysql的時候發生這個錯誤 error 1130 host 192.168.1.3 is not allowed to connect to this mysql server...

MySql授權使用者遠端訪問

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