ユーザ管理
SELECT Host, User, Password FROM mysql.user;
CREATE USER 'kinosuke'@'localhost' IDENTIFIED BY 'some password';
GRANT USAGE ON *.* TO 'kinosuke'@'localhost' IDENTIFIED BY PASSWORD '*235FBD5A94312B29D808844FC68009764D01AD27';
RENAME USER 'kinosuke'@'localhost' TO 'new_name'@'new_host';
SET PASSWORD FOR 'kinosuke'@'localhost' = PASSWORD('some password');
DROP USER 'kinosuke'@'localhost';
権限変更
SHOW GRANTS FOR 'kinosuke'@'localhost';
GRANT 権限 ON *.* TO 'kinosuke'@'localhost';
GRANT 権限 ON db_name.* TO 'kinosuke'@'localhost';
GRANT 権限 ON db_name.table_name TO 'kinosuke'@'localhost';
GRANT 権限 (カラム1, カラム2, ...) ON db_name.table_name TO 'kinosuke'@'localhost';
GRANT SELECT ON `mydb`.* TO 'kinosuke'@'localhost';