红叶的技术日志

希望每天能努力多一点

IT博客 首页 新随笔 联系 聚合 管理
  184 Posts :: 9 Stories :: 22 Comments :: 0 Trackbacks

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"
posted on 2008-05-13 11:53 applezk's IT blog 阅读(13938) 评论(0)  编辑 收藏 引用 所属分类: MySQL
只有注册用户登录后才能发表评论。