mysql添加超级管理员

mysql>create user 'myroot'@'localhost' identified by 'myroot';
mysql>grant all privileges on *.* to 'myroot'@'localhost';
mysql>flush priviledges;

ok,可以拿myroot在本地登录管理,但是要在远程管理还不行。接下来解决在远程登录管理的问题。

mysql>create user 'myroot'@'%' identified by 'myroot';
mysql>grant all privileges on *.* to 'myroot'@'%';
mysql>flush priviledges;

还有,mysql.user密码加密的方式是使用PASSWORD进行的。

 

删除用户
mysql>revoke all on *.* from sss@localhost ;
msyql>Delete from user where user = "user_name" and host = "host_name" ;
mysql>flush privileges ;

 

posted @ 2014-12-02 10:59  simpman  阅读(1852)  评论(0编辑  收藏  举报