您好,欢迎来到星星旅游。
搜索
您的当前位置:首页mysql添加用户、更改密码_MySQL

mysql添加用户、更改密码_MySQL

来源:星星旅游

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

Copyright © 2019- stra.cn 版权所有 赣ICP备2024042791号-4

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务