设为首页 加入收藏

TOP

mysql添加用户、更改密码
2014-11-24 03:26:07 来源: 作者: 【 】 浏览:0
Tags:mysql 添加 用户 更改 密码

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"

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇降低锁竞争 减少MySQL用户等待时间 下一篇mysql 乱码产生探讨

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·用 C 语言或者限制使 (2025-12-25 08:50:05)
·C++构造shared_ptr为 (2025-12-25 08:50:01)
·既然引用计数在做 GC (2025-12-25 08:49:59)
·Java 编程和 c 语言 (2025-12-25 08:19:48)
·. net内存管理宝典这 (2025-12-25 08:19:46)