Until MariaDB 5.5, the mysql.host table contained information about hosts and their related privileges. When determining permissions, if a matching record in the mysql.db table had a blank host value, the mysql.host table would be examined.

From MariaDB 10.0, the mysql.host table has been unused.

This table is not effected by an GRANT statements, and had to be updated manually.

See privileges for a more complete view of the MariaDB privilege system.

The mysql.host table contains the following fields:

FieldTypeNullKeyDefaultDescription
Hostchar(60)NOPRIHost (together with Db makes up the unique identifier for this record.
Dbchar(64)NOPRIDatabase (together with Host makes up the unique identifier for this record.
Select_privenum('N','Y')NONCan perform SELECT statements.
Insert_privenum('N','Y')NONCan perform INSERT statements.
Update_privenum('N','Y')NONCan perform UPDATE statements.
Delete_privenum('N','Y')NONCan perform DELETE statements.
Create_privenum('N','Y')NONCan CREATE TABLEs.
Drop_privenum('N','Y')NONCan DROP DATABASEs or DROP TABLEs.
Grant_privenum('N','Y')NONUser can grant privileges they possess.
References_privenum('N','Y')NONUnused
Index_privenum('N','Y')NONCan create an index on a table using the CREATE INDEX statement. Without the INDEX privilege, user can still create indexes when creating a table using the CREATE TABLE statement if the user has have the CREATE privilege, and user can create indexes using the ALTER TABLE statement if they have the ALTER privilege.
Alter_privenum('N','Y')NONCan perform ALTER TABLE statements.
Create_tmp_table_privenum('N','Y')NONCan create temporary tables with the CREATE TEMPORARY TABLE statement.
Lock_tables_privenum('N','Y')NONAcquire explicit locks using the LOCK TABLES statement; user also needs to have the SELECT privilege on a table in order to lock it.
Create_view_privenum('N','Y')NONCan create a view using the CREATE_VIEW statement.
Show_view_privenum('N','Y')NONCan show the CREATE VIEW statement to create a view using the SHOW CREATE VIEW statement.
Create_routine_privenum('N','Y')NONCan create stored programs using the CREATE PROCEDURE and CREATE FUNCTION statements.
Alter_routine_privenum('N','Y')NONCan change the characteristics of a stored function using the ALTER FUNCTION statement.
Execute_privenum('N','Y')NONCan execute stored procedure or functions.
Trigger_privenum('N','Y')NONCan execute triggers associated with tables the user updates, execute the CREATE TRIGGER and DROP TRIGGER statements.

Comments

Comments loading...