mysql权限管理命令

#创建用户

create user 'songwp' IDENTIFIED BY '1234'

#用户授权

GRANT ALL ON DB01.* TO 'songwp'

#撤销权限

REVOKE ALL ON DB01.* FROM 'songwp'

#删除用户

DROP USER 'songwp'

#mysql授权:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;

#刷新权限:

flush privileges;

#开启服务:

service mysqld start(mysql)

#停止服务

service mysqld stop

#重启服务

service mysqld restart

service mysql restart ----------->5.5.7版本命令

posted @ 2020-11-11 17:44  [奋斗]  阅读(112)  评论(0编辑  收藏  举报