- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業(yè)務(wù)經(jīng)營許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯(lián)網(wǎng)協(xié)會理事單位
- 安全聯(lián)盟認(rèn)證網(wǎng)站身份V標(biāo)記
- 域名注冊服務(wù)機(jī)構(gòu)許可:滇D3-20230001
- 代理域名注冊服務(wù)機(jī)構(gòu):新網(wǎng)數(shù)碼
1.首先創(chuàng)建用戶密碼:tom tompassword
>mysql -uroot -p 鍵入密碼登陸到root用戶
mysql>insert into mysql.user(host,user,password) values(‘localhost’,’tom’,password(‘tompassword’)); #表中插入用戶
mysql>flush ppribileges; #刷新系統(tǒng)權(quán)限表
2.創(chuàng)建數(shù)據(jù)庫:dbtom
mysql>create database dbtom;
3.授權(quán)tom用戶擁有dbtom數(shù)據(jù)庫的所有權(quán)限
mysql>grant all privileges on tomdb.* to tom@localhost identified by ‘tom’;
mysql>flush privileges;
如果僅僅指定部分權(quán)限給tom用戶:
mysql>grant select,update on dbtom.* to tom@localhost identified by ‘tom’;
mysql>flush privileges;
4.這樣tom用戶就可以登陸到mysql中對dbtom數(shù)據(jù)庫進(jìn)行管理了,但是對其他數(shù)據(jù)庫沒有操作權(quán)限。
5.刪除用戶
mysql>delete from user where user=”tom” and host=”localhost”;
mysql>flush privileges;
6.刪除數(shù)據(jù)庫
mysql>drop database tomdb;
7.修改tom用戶的密碼
mysql>update mysql.user set password=password(‘新密碼’) where user=”tom”;
mysql>flush privileges;
mysql>quit;
提交成功!非常感謝您的反饋,我們會繼續(xù)努力做到更好!
這條文檔是否有幫助解決問題?
售前咨詢
售后咨詢
備案咨詢
二維碼
TOP