Create a User
Once we are connected to the MariaDB server, use the CREATE USER statement to create a new user. Replace the username and password with the desired username and password for the new user.
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
Once we create user, check its status by entering:
SELECT User FROM mysql.user;
Example: Suppose we create a user named minal along with their password. Below are the syntax:
CREATE USER 'minal'@'localhost' IDENTIFIED BY '******';
SELECT User FROM mysql.user;
Output:
Explanation: As we can see in the output image the user named minal is created. Also Please use your password in place of ****.
How to Create User With Grant Privileges in MariaDB
In database management, effective user management and privilege assignment are important for secure and efficient operations. MariaDB, a popular open-source relational database management system, offers robust features for managing users and their access rights.
In this article, we will understand how to create users and grant privileges to them in MariaDB with the help of various examples.
Contact Us