mysql -e "GRANT ALL PRIVILEGES ON mydb.* TO 'alice'@'localhost';"
Grant all privileges on a database to a user
mydb.* means every table in mydb; the account is 'alice'@'localhost', and the host part matters because 'alice'@'%' would be a different account. GRANT takes effect immediately, no FLUSH needed. Related: SHOW GRANTS, REVOKE.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.