

It will also show you how to log out of the root MySQL user account, and log back in under the account you’ve just created. This section will help you list the privileges held by a user account, take privileges away from a user, and completely delete a user account. Likewise, you can restrict a user’s access to a particular table by naming it after the dot, as in the command below: GRANT INSERT *database_name.table_name* TO MySQL User Management If you want to limit the user’s access to a specific database, name that database before the dot. Run the command for each privilege you wish to grant. The basic syntax used to grant privileges to a user account is: GRANT permission_type ON database.table TO example, to grant insert privileges to a MySQL user you would run the command: GRANT INSERT ON *.* TO can replace the privilege level according to your needs. Grant Option: The user can modify other user account privileges.Select: The user gets access to the select command, to read the information in the databases.Drop: The user can drop (remove) entire tables and databases.Create: The user can create entirely new tables and databases.Delete: The user can remove rows from tables.Insert: The user can insert rows into tables.All Privileges: The user account has full access to the database.Depending on how much authority you want your user to have, you can grant them one, several or all of the following privileges: Permissions are actions that the user is allowed to perform in the database.

How to Grant Permissions in MySQLīefore logging in with a new account, make sure you have set the permissions for the user. Note: Make sure you use a strong and complex password, especially if you are setting up a user who can connect from any machine.
