MySql 账户管理
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySql 账户管理相关的知识,希望对你有一定的参考价值。
【MySql 账户管理】
You must connect to the mysql server as the MySQL root
user, which has the CREATE USER
privilege.
CREATE USER
creates a new row in the mysql.user
table.
Example 1: Create an account that uses the default authentication plugin and the given password. Mark the password expired so that the user must choose a new one at the first connection to the server:
Example 2: Create an account that uses the sha256_password
authentication plugin and the given password. Require that a new password be chosen every 180 days:
Example: This statement creates two accounts, each with the default authentication plugin and named password. For both accounts, connections must be made using a valid X509 certificate and up to 60 queries per hour are permitted. Both accounts are locked initially, so effectively they are placeholders and cannot be used until an administrator unlocks them:
grant 语句示例:
删除用户:
设置密码:
参考:http://dev.mysql.com/doc/refman/5.7/en/account-management-sql.html
以上是关于MySql 账户管理的主要内容,如果未能解决你的问题,请参考以下文章