`
cyhcheng
  • 浏览: 58346 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

mysql创建用户及授权

 
阅读更多

drop user zhaojing@localhost;
grant all privileges on zhaojingdb.* to zhaojing@localhost identified by 'doyouloveme';

分享到:
评论
4 楼 cyhcheng 2011-12-16  
创建用户及授权:
CREATE USER 'userName'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON databaseName.* TO 'userName'@'%'WITH GRANT OPTION;
3 楼 cyhcheng 2011-12-07  
update mysql.user set password=password('newpassword') where user='root';
2 楼 cyhcheng 2011-12-07  
修改密码:mysqladmin -u root -poldpassword password newpassword
1 楼 cyhcheng 2011-12-01  
如果忘记root帐号密码:首先停止mysql,然后mysqld --skip-grant-tables启动Mysql服务器。最后在命令行或工具就可随便修改密码了。

相关推荐

Global site tag (gtag.js) - Google Analytics