本文共 717 字,大约阅读时间需要 2 分钟。
1. MySQL用户管理
shell> mysql --user=finley --password db_name
CREATE USER 'custom'@'localhost' IDENTIFIED BY 'password';
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON bankaccount.* TO 'custom'@'localhost';
mysql> DROP USER 'jeffrey'@'localhost';
CREATE USER 'francis'@'localhost' IDENTIFIED BY 'frank'
-> WITH MAX_QUERIES_PER_HOUR 20-> MAX_UPDATES_PER_HOUR 10-> MAX_CONNECTIONS_PER_HOUR 5-> MAX_USER_CONNECTIONS 2;
mysql> ALTER USER 'francis'@'localhost' WITH MAX_QUERIES_PER_HOUR 100;
ALTER USER 'jeffrey'@'localhost' PASSWORD EXPIRE;
SET GLOBAL default_password_lifetime = 180;
转载地址:http://savta.baihongyu.com/