Skip to content

mysql用户管理 #9

Description

@HuarenYu

创建用户
CREATE USER 'username'@'host' IDENTIFIED BY 'password';

授权
GRANT privileges ON databasename.tablename TO 'username'@'host';

修改密码
SET PASSWORD FOR 'username'@'host' = PASSWORD('newpassword');

删除用户
DROP USER ‘username’@'host’;

修改用户访问地址

RENAME USER 'jeffrey'@'localhost' TO 'jeff'@'127.0.0.1';

刷新权限
FLUSH PRIVILEGES;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions