Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql用户管理 #9

Open
HuarenYu opened this issue Jul 27, 2016 · 0 comments
Open

mysql用户管理 #9

HuarenYu opened this issue Jul 27, 2016 · 0 comments

Comments

@HuarenYu
Copy link
Owner

HuarenYu commented Jul 27, 2016

创建用户
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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant