mysql 網路授權工具 mysql給主機授權

2021-10-17 20:46:26 字數 694 閱讀 6684

grant語句雖然能夠為使用者分配許可權,使用比較方便,但是從安全角度,從增加對系統了解角度,你應該盡量使用直接修改授權表的方法。這樣可以更精確的控制授權,能夠對授權表完全了解,避免因為 grant語句的錯誤,是mysql伺服器的安全性降低。

首先進入mysql的命令列

允許位址192.168.0.5上用root使用者,密碼www.onbno.com來連線mysql的所有資料庫,付給select,insert,update,delete許可權。

# mysql -u root -proot

grant select,insert,update,delete on *.* to root@」192.168.0.5″ identified by 「dboomysql」;

允許位址192.168.0.5上用root使用者,密碼www.onbno.com來連線mysql的所有資料庫,付給所有許可權。

# mysql -u root -proot

grant all on *.* to root@」192.168.0.5″ identified by 「dboomysql」

操作完後切記執行以下命令重新整理許可權

flush privileges

然後就是在192.168.0.5這台機器上進行連線你的mysql這台機器了

原則上你這台機器192.168.0.5的防火牆必須給要訪問他的機器開放埠

這裡就不詳細介紹了

mysql授權 mysql授權

2.授權法。pis1 允許使用者myuser使用mypassword從任何主機連線到mysql伺服器。sql 1 grant all privileges on to myuser identified by mypassword with grant option 2 flush privileg...

mysql 授權 mysql 使用者授權

mysql grant 許可權1,許可權2,許可權n on 資料庫名稱.表名稱 to 使用者名稱 使用者位址 identified by 連線口令 許可權1,許可權2,許可權n代表select,insert,update,delete,create,drop,index,alter,grant,re...

mysql授權書 MySQL授權

一 建立新使用者 insert into mysql.user host,user,password values localhost newuser password 123456 如果報錯將my.ini或者my.cnf,查詢 sql mode strict trans tables,no aut...