MySQL privileges control exactly what a user can and cannot do inside a database. The Nobregas MySQL Panel offers 18 individual privileges plus the ALL PRIVILEGES shortcut. Understanding each one helps you grant the right level of access for every use case.
Privilege Reference Table
| Privilege | Category | Description |
|---|---|---|
| SELECT | Data | Read rows from tables |
| INSERT | Data | Add new rows to tables |
| UPDATE | Data | Modify values in existing rows |
| DELETE | Data | Remove rows from tables |
| CREATE | Structure | Create new tables |
| ALTER | Structure | Change table structure (columns, types) |
| DROP | Structure | Delete tables and views |
| INDEX | Structure | Create and remove indexes |
| REFERENCES | Structure | Create foreign key constraints |
| CREATE TEMPORARY TABLES | Admin | Create temporary session-scoped tables |
| LOCK TABLES | Admin | Lock tables for exclusive access |
| CREATE VIEW | Admin | Create virtual tables (views) |
| SHOW VIEW | Admin | See the SQL definition of views |
| CREATE ROUTINE | Admin | Create stored procedures and functions |
| ALTER ROUTINE | Admin | Modify or delete stored procedures |
| EXECUTE | Admin | Run stored procedures and functions |
| EVENT | Admin | Create and manage scheduled events |
| TRIGGER | Admin | Create and manage table triggers |
Data Privileges — Explained in Detail
SELECT
Allows the user to read data using SELECT queries. This is the most fundamental privilege. Without it, the user cannot retrieve any information from tables. Required for any kind of reporting, display, or data retrieval.
INSERT
Allows the user to add new rows with INSERT statements. Needed for form submissions, user registrations, logging, and any operation that creates new records.
UPDATE
Allows the user to modify existing rows with UPDATE statements. Needed for editing profiles, changing settings, updating inventory counts, and similar operations.
DELETE
Allows the user to remove rows with DELETE statements. Needed for removing records, cleaning up old data, and managing content.
Structure Privileges — Explained in Detail
CREATE
Allows creating new tables using CREATE TABLE. Most applications only need this during initial setup or when running migrations.
ALTER
Allows modifying table structure with ALTER TABLE — adding, renaming, or dropping columns, changing data types, and modifying indexes. Essential during migrations but rarely needed in production.
DROP
Allows deleting tables and views with DROP TABLE or DROP VIEW. This is a destructive privilege — a user with DROP can permanently remove an entire table and all its data.
INDEX
Allows creating and removing indexes on tables. Indexes speed up queries but can slow down writes. Usually only needed by database administrators or migration tools.
REFERENCES
Allows creating foreign key constraints between tables. Only relevant for databases using relational integrity with FOREIGN KEY definitions.
Administration Privileges — Explained in Detail
CREATE TEMPORARY TABLES
Allows creating temporary tables that only exist for the current database session. Useful for complex queries that need intermediate result storage.
LOCK TABLES
Allows explicitly locking tables with LOCK TABLES. Needed for operations that require exclusive access to prevent concurrent modifications.
CREATE VIEW
Allows creating views — virtual tables defined by a SQL query. Views simplify complex queries and can restrict visible columns.
SHOW VIEW
Allows viewing the CREATE VIEW statement behind an existing view. Needed for debugging or inspecting view definitions.
CREATE ROUTINE
Allows creating stored procedures and functions. These are reusable SQL programs stored inside the database.
ALTER ROUTINE
Allows modifying or dropping existing stored procedures and functions.
EXECUTE
Allows running stored procedures and functions with CALL statements. A user may need EXECUTE without CREATE ROUTINE if they only need to run procedures others created.
EVENT
Allows creating, modifying, and dropping scheduled events — MySQL's built-in task scheduler for running SQL at specified intervals.
TRIGGER
Allows creating and dropping triggers — automatic SQL actions that fire when rows are inserted, updated, or deleted in a table.
ALL PRIVILEGES
Checking ALL PRIVILEGES grants every privilege listed above simultaneously. It is a convenience shortcut equivalent to checking all 18 individual checkboxes. Use it for trusted users who need complete control over a database.
Choosing the Right Privileges
| Use Case | Recommended Privileges |
|---|---|
| Read-only reporting | SELECT |
| Standard web app | SELECT, INSERT, UPDATE, DELETE |
| App with migrations | SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, INDEX |
| Full admin access | ALL PRIVILEGES |
| Stored procedure runner | SELECT, EXECUTE |