Home > Database > Mysql Tutorial > mysql添加用户、更改密码_MySQL

mysql添加用户、更改密码_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:47:27
Original
991 people have browsed it

bitsCN.com

mysql添加用户方法 

建立数据库gamesp

create database gamesp;

添加用户

grant  all  on  数据库名.*   to   用户名@localhost  identified  by  密码;


grant all on gamesp.* to newuser@localhost identified by password;

说明:

(1)grant all 赋予所有的权限

(2)gamesp.* 数据库 gamesp 中所有的表

(3)newuser 用户名

(4)@localhost 在本地电脑上的 mysql server 服务器

(5)identfified by password 设置密码

 

删除用户
use mysql
mysql>Delete FROM user Where User="xxxxx" and Host="localhost";
mysql>flush privileges;

 

修改密码
mysqladmin -uroot -plk317921web password "111111"

bitsCN.com
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
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template