Creates a user with a given name and password.
CREATE USER userName WITH PASSWORD 'password';
userName- new user's name. The name cannot be longer than 60 bytes in UTF8 encoding.
password- new user's password. The empty password is not allowed.
The command creates a user with a given name and password.
A new user can only be created using a superuser account. Ignite creates the superuser account under the name ignite and password ignite on the first cluster start-up. Presently, you can't rename the superuser account nor grant its privileges to any other account.
To create a case-sensitive username, use the quotation (") SQL identifier.
When Case-Sensitive Names are Preferred?
The case-insensitivity property of the usernames is supported for JDBC and ODBC interfaces only. If it's planned to access Ignite from Java, .Net or other programming languages APIs then the username has to be passed either in the upper-case letters or enclosed in double quotes (") from those interfaces.
For instance, if
Test was set as a username then:
- You can use
TESTand other combinations from JDBC and ODBC.
- You can use either
"Test"as the username from Ignite's native SQL APIs designed for Java, .NET and other programming languages.
Alternatively, use the case-sensitive username all the times to ensure the name consistency across all the SQL interfaces.
Create a new user using
test as a name and password:
CREATE USER test WITH PASSWORD 'test';
Create a case-sensitive username:
CREATE USER "TeSt" WITH PASSWORD 'test'