Home > Database > Mysql Tutorial > mysql新增用户,用户受权,删除用户

mysql新增用户,用户受权,删除用户

WBOY
Release: 2016-06-07 16:24:04
Original
984 people have browsed it

mysql新增用户,用户授权,删除用户 查询所有用户 select * from mysql.user; 增加用户 insert into mysql.user(Host,User,Password) values("%","admin",password("SP@temobi")); flush privileges;? 这一步骤很重要,要不然会报错!所以必须执行! 新建数据

mysql新增用户,用户授权,删除用户

查询所有用户
select * from mysql.user;


增加用户
insert into mysql.user(Host,User,Password) values("%","admin",password("SP@temobi"));
flush privileges;? 这一步骤很重要,要不然会报错!所以必须执行!


新建数据库授权给admin用户
create database sqview;
grant all privileges on sqview.* to admin;
flush privileges;


删除用户
DELETE FROM mysql.user WHERE User="admin" and Host="%";

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template