标签:variable 相关 class glob creat length grant roo create
1. CREATE USER ‘dog2‘@‘localhost‘ IDENTIFIED BY ‘‘;
将"localhost"改为"%",表示在任何一台电脑上都可以登录;也可以指定某台机器可以远程登录;
2. GRANT privileges ON databasename.tablename TO ‘username‘@‘host‘
GRANT all privileges ON mq.* TO ‘dog‘@‘localhost‘;
3. Delete FROM user Where User=‘test‘ and Host=‘localhost‘;
4. UPDATE user SET Password = PASSWORD(‘newpass‘) WHERE user = ‘root‘;
最后 flush privileges;
mysql 5.7密码安全策略
SHOW VARIABLES LIKE ‘validate_password%‘;
set global validate_password_length=4;
标签:variable 相关 class glob creat length grant roo create
原文地址:http://www.cnblogs.com/qbmiller/p/6746295.html