Chinaunix首页 | 论坛 | 博客
  • 博客访问: 236365
  • 博文数量: 49
  • 博客积分: 3040
  • 博客等级: 少校
  • 技术积分: 450
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-29 09:28
文章分类

全部博文(49)

文章存档

2011年(8)

2010年(16)

2009年(25)

分类: Mysql/postgreSQL

2009-12-29 10:49:37

mysql添加用户方法 

建立数据库gamesp

create database gamesp;

添加用户

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

grant all on gamesp.* to newuser 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″

阅读(2495) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~