-
Admin
- FILE
- PROCESS
- SUPER
- ALL
-
Table
- SELECT
- DELETE
- INSERT
- UPDATE
-- dba
create user 'dba'@'localhost' identified by 'password';
grant all on *.* to 'dba'@'localhost';
flush privileges;
-- repl
create user 'repl'@'%' identified by 'password';
grant replication slave on *.* to 'repl'@'%';
flush privileges;
GRANT SELECT ON sakila.* TO
'shawn'@'localhost' IDENTIFIED BY 'passwd';
SHOW GRANTS ;
FLUSH PRIVILEGES ;
mysqladmin
mysqladmin flush-privileges
mysqladmin reload
REVOKE
REVOKE DELETE, INSERT, UPDATE ON sakila.*
FROM 'shawn'@'localhost';
mysqld_safe --skip-grant-tables
mysql --skip-networking
mysql --socket
- MAX_USER_CONNECTIONS
- MAX_QUERIES_PER_HOUR
- MAX_UPDATES_PER_HOUR
- MAX_CONNECTIONS_PER_HOUR
- MAX_USER_CONNECTIONS
GRANT ALL ON sakila.* TO 'shawn'@'localhost'
WITH MAX_QUERIES_PER_HOUR 20
MAX_UPDATES_PER_HOUR 10
MAX_CONNECTIONS_PER_HOUR 5
MAX_USER_CONNECTIONS 2;
SHOW GRANTS FOR 'shawn'@'localhost';