随笔-124  评论-194  文章-0  trackbacks-0
update user set password = password ('xxxx') where user = "root";
grant all privileges on *.* to root@'%' identified by 'xxxx';

其它参数的例子:
grant select,insert,update,delete,create,drop on vtdc.employee to joe@10.163.225.87 identified by '123';

  给来自10.163.225.87的用户joe分配可对数据库vtdc的employee表进行select,insert,update,delete,create,drop等操作的权限,并设定口令为123。


要重启一次MYSQL才能使本地用户密码生效:

/usr/local/mysql/support-files/mysql.server restart


posted on 2009-02-12 14:31 我爱佳娃 阅读(1631) 评论(0)  编辑  收藏 所属分类: DB相关

只有注册用户登录后才能发表评论。


网站导航: