Database User Accounts for MariaDB Xpand
This page is part of MariaDB's MariaDB 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 Table
Xpand stores database user account information in the system.users
table.
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.