마스터와 같은 권한을 가진 사용자 생성
SHOW GRANTS FOR <master>;
ex) show grants for root;
아래 권한 복사
| Grants for root@% |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'root'@'%' WITH GRANT OPTION |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
create user 'user'@'%' indentified by 'password';
grant SELECT,INSERT,UPDATE,DELETE,DROP,CREATE on *.* to 'user'@'%';
사용자 삭제
drop user 'user';
delete from user where user = 'user';