Database User Accounts for MariaDB Xpand
This page is part of MariaDB's Documentation.
The parent of this page is: Database User Accounts
Topics on this page:
Overview
With MariaDB Xpand, you can create, alter, and drop database user accounts.
Create
To create a database user account with MariaDB Xpand, use the CREATE USER
statement:
CREATE USER 'USER'@'192.0.2.%'
IDENTIFIED BY 'PASSWD';
Replace the referenced IP address with the relevant address for your environment.
Replace USER
and PASSWD
with appropriate credentials for the new user account.
Alter
To alter a database user account with MariaDB Xpand, use the ALTER USER
statement:
CREATE USER 'USER'@'192.0.2.%'
IDENTIFIED BY 'PASSWD';
Drop
To drop a database user account with MariaDB Xpand, use the DROP USER
statement:
DROP USER 'USER'@'192.0.2.%';
System Tables
The following system tables are related to user accounts, roles, and privileges:
System Table | Description |
---|---|
| Stores the names of all roles on the Xpand cluster. |
| Stores the mapping between roles and and user specifications, including whether the user was granted |
| Stores the list of roles available to a session. |
| Stores user account details |
| Stores global, database, and table privileges for user accounts |
| Stores a mapping between roles and user specifications, including whether the role is a default role for the user. |
| Stores routine privileges for user accounts |
Caveats
Xpand does not support:
DROP USER IF EXISTS
netmask notation for IP addresses
directly modifying the
users
table.
Xpand allows usernames and hostnames to be up to 256 characters long and will truncate names longer than the permitted length. Xpand recommends that usernames be 16 characters or shorter and hostnames be 60 characters or shorter.