Home >Database >Mysql Tutorial >mysql用户权限基本操作_MySQL

mysql用户权限基本操作_MySQL

WBOY
WBOYOriginal
2016-05-30 17:10:15940browse

创建用户

create user 'username'@'host' IDENTIFIED BY 'PASSWORD'

 

给指定用户授权

 

grant all on DBName.* to 'username'@'host'

 

刷新权限

 

flush privileges;

 

查看用户权限

 

show grants for 'user'@'host'

 

换行查询信息,主要针对多行

 

select * from user \G

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn