MySQL授权管理

创建用户

create user [email protected] identified by 'your-password'

指定权限

grant select, insert, update, delete on db-name.t_user to [email protected]  identified by ‘your-password′

指定库

grant all privileges on db-name.* to [email protected] identified by 'your-password'

指定表

grant all privileges on db-name.t_user to [email protected] identified by 'your-password'

指定主机

grant all privileges on *.* to [email protected] identified by 'your-password'

使生效

flush privileges

猜你喜欢

转载自blog.csdn.net/lpw_cn/article/details/84470548