mysql資料庫的使用者建立,許可權設定

2021-08-28 04:38:50 字數 372 閱讀 5775

mysql終端執行命令

create

user meiduo identified by

'meiduo';

grant

allon meiduo_mall.* to

'meiduo'@'%';

flush privileges;

說明:

第一句:建立使用者賬號 meiduo, 密碼 meiduo (由identified by 指明)

第二句:授權meiduo_mall資料庫下的所有表(meiduo_mall.*)的所有許可權(all)給使用者meiduo在以任何ip訪問資料庫的時候(』meiduo』@』%』)

第三句:重新整理生效使用者許可權

mysql資料庫 使用者的建立 許可權管理

建立乙個aaa使用者只能在本地登入 create user aaa localhost identified by 密碼 建立乙個使用者bbb只能在 ip 位址為10.10.10.10 ip 登入 create user bbb 10.10.10.10 identified by 密碼 create...

資料庫建立使用者及許可權

1 在新使用者中建立資料庫 a 新建使用者 進入root賬戶 mysql uroot p 建立新使用者方法有二 第一種 mysql grant all privileges on to username identified by 1234 mysql grant all privileges on...

mysql建立資料庫,建立使用者

建立資料庫 create database test use test 建立使用者 create user test identified by test 給使用者賦權 grant all on test.to test 建立資料庫 命令 create database databasename 例...