What are Database User Privileges?

Databases are created and maintained using MySQL. Another MySQL function is to verify credentials and permissions.

First, to initiate a connection to a database, MySQL must authenticate a database user and password combination (as well as the hostname from which the request was made).

Once the connection is authorized, commands to manipulate a particular database are validated. During validation, MySQL checks that privileges have been granted to the specified database for the database user.

The database user privileges need to be granted before MySQL will allow that user to execute the request on the database. MySQL maintains these privileges in its own database table mysql.

Common Privileges

The table below displays the most common MySQL user privileges that can be assigned to a database user.

MySQL Privileges
ALTERDELETELOCK TABLES
ALTER ROUTINEDROPREFERENCES
CREATEEVENTSELECT
CREATE ROUTINEEXECUTESHOW VIEW
CREATE TEMPORARY TABLESINDEXTRIGGER
CREATE VIEWINSERTUPDATE

To learn more about Database User Privileges check out the official MySQL documentation here. You can also learn how to create a database user and assign it privileges from the command line.

JB
John-Paul Briones Content Writer II

John-Paul is an Electronics Engineer that spent most of his career in IT. He has been a Technical Writer for InMotion since 2013.

More Articles by John-Paul

Was this article helpful? Join the conversation!