mysql使用者授權

2022-07-28 18:30:36 字數 818 閱讀 6499

select distinct concat('user: ''',user,'''@''',host,''';') as query from mysql.user; 檢視所有使用者及許可權

grant all on *.* to 'liangliang'@'%'; 授與量量使用者所有許可權

grant all privileges  on *.* to root@'%' identified by "password";允許root使用者遠端登入 

flush privileges;

重新整理許可權

select host,user,password from user ;檢視使用者密碼設定

set global read_only=1;普通賬號的唯讀模式

set global super_read_only=1;超級使用者的唯讀模式

grant select,update,insert,create on *.* to root@"%" identified by "123456";

授與root遠端使用者選擇,更新,插入,建立許可權;

檔案加i鎖

chattr +i /etc/passwd

檢視方法:lsattr /etc/passwd,撤銷為chattr –i /etc/group

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授權使用者許可權

grant 普通資料使用者,查詢 插入 更新 刪除 資料庫中所有表資料的權利。grant select on testdb.to common user grant insert on testdb.to common user grant update on testdb.to common us...

mysql授權 MySQL使用者授權(GRANT)

當成功建立使用者賬戶後,還不能執行任何操作,需要為該使用者分配適當的訪問許可權。可以使用 show grant for 語句來查詢使用者的許可權。注意 新建立的使用者只有登入 mysql 伺服器的許可權,沒有任何其他許可權,不能進行其他操作。usage on 表示該使用者對任何資料庫和任何表都沒有許...