MySQL Basics In Pictures
Restrict a user
GRANT SELECT,INSERT ON us_presidents.* TO marty@localhost IDENTIFIED BY 'watch4keys';
This command string restores
as a user of the MySQL server, but lessens his user privileges:
ed permission to give only the
commands to the database
You usually want to give users only the privileges they need. Otherwise, a user may make changes to the database that you don't want or expect.
Close the MySQL database connection, then exit the terminal window.