[CloudZ DB] How can I add/delete MariaDB user accounts?

Print

If the version of the Cloud Z DB Console is v2.1 or higher, user accounts can be added/deleted through the Console. 

For versions lower than v2.1, you can connect to the DB using the provided admin account to add/delete user accounts.


Adding/Deleting User Accounts via the Console 


1. Go to the Management screen 


2. Add/manage users and manage privileges 


You can add Users or Schemas using the Add button.

User and Schema management is available through the Actions button.

Select a User and Schema to set privileges for the User on the Schema, and click the Apply button to save the changes.


Managing User Accounts via the admin account 


When a service is initially created in the Z DB Console, an admin account is generated.
After that, password management for the admin account can be handled through the Z DB Console. 

< Z DB Console - Connection Info Password change >





1. Account Creation and Management - Adding User Accounts 


Connect to the DB using the connection info specified in the Z DB Console's Connection Info.
From there, you can manage user accounts and privileges.

To connect via the MariaDB client, use the command line below.

To connect using MariaDB tools (e.g., DBeaver), refer to the corresponding method.


When creating accounts, follow SK’s security guidelines: 

  • Passwords must be composed of at least 3 types of characters and at least 8 characters in length 
    • Must include at least 3 of: uppercase, lowercase, special characters, numbers, and be 9 or more characters 
  • Limit access to the mysql.usertable 
    • Do not grant privileges on *.* 
  • Control DB access by IP 
    • Instead of allowing all IPs with %, specify only the permitted IPs 



Account Creation

create user {username}@'{allowed_IP}' identified by 'Password (at least 9 characters including 3 or more of uppercase, lowercase, special characters, and numbers)';
ex) CREATE USER 'test_user'@'10.178.132.%' IDENTIFIED BY 'Test_User!@34';

grant [privileges] on [database].[table] to {username}@'{allowed_IP}';

ex) GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `testdb`.* TO `test_user`@`10.178.132.%`;
For more details on account creation, refer to the MariaDB manual: https://mariadb.com/kb/en/create-user/


2. Account Creation and Management – Changing User Account Passwords 

Connect to the DB using the information in Connection Info in the Z DB Console.
Then manage user accounts and privileges.

Use the same connection method described in "1. Account Creation and Management – Adding User Accounts" via command line or MariaDB tool.




Change Password

alter user {username}@'{allowed_IP}' identified by 'NewPassword (at least 9 characters including 3 or more of uppercase, lowercase, special characters, and numbers)';
ex) ALTER USER 'test_user'@'10.178.132.%' IDENTIFIED BY 'Test_User!@34';


For more details on account modification, refer to the MariaDB manual:
https://mariadb.com/kb/en/create-user/


3. Account Creation and Management – Deleting User Accounts 

Connect to the DB using the information in Connection Info in the Z DB Console.
Then manage user accounts and privileges.

Use the same connection method described in "1. Account Creation and Management – Adding User Accounts".



Delete Account

drop user {username}@'{allowed IP}';
ex) DROP USER 'test_user'@'10.178.132.%';

For more details on account deletion, refer to the MariaDB manual: https://mariadb.com/kb/en/drop-user/






Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.