To give all grant privileges for all database, use
mysql> GRANT ALL PRIVILEGES ON *.* TO 'luna'@'localhost'
WITH GRANT OPTION;
To grant SELECT, UPDATE, INSERT for account database, use
mysql> GRANT SELECT, UPDATE, INSERT, DELETE, CREATE, DROP ON
account.* TO 'luna'@'localhost';
To check the grant a user has, use
mysql> SHOW GRANTS FOR 'luna'@'localhost';
No comments:
Post a Comment