sql創(chuàng)建用戶并授權(quán) mysql數(shù)據(jù)庫(kù)怎么創(chuàng)建新用戶?
mysql數(shù)據(jù)庫(kù)怎么創(chuàng)建新用戶?1. 用administrator登錄MySQL2。創(chuàng)建數(shù)據(jù)庫(kù)db013。Create user只能在本地訪問(wèn)user01Create user user01@“l(fā)oc
mysql數(shù)據(jù)庫(kù)怎么創(chuàng)建新用戶?
1. 用administrator登錄MySQL
2。創(chuàng)建數(shù)據(jù)庫(kù)db01
3。Create user
只能在本地訪問(wèn)user01
Create user user01@“l(fā)ocalhost”由“password1”標(biāo)識(shí)
user02可以遠(yuǎn)程訪問(wèn)
Create user user02@“%”由“password1”標(biāo)識(shí)
4。Modify user01 password
為“user01”@“l(fā)ocalhost”=密碼(“password2”)設(shè)置密碼
5。Authorize
a),user01管理db01的所有權(quán)限
授予db01的所有權(quán)限。*對(duì)user01
b),user02查看權(quán)限并修改密碼
授予select on*。*收件人“user02”@“%”由“password2”標(biāo)識(shí)