Create User in MySQL

We can create user in MySQL Server by using CREATE USER statement. For each account, CREATE USER creates a new row in the mysql.user system table. To create user in MySQL Server, user must have CREATE USER privileges.

Syntax to Create User in MySQL:

CREATE USER [IF NOT EXISTS] user [auth_option] [, user [auth_option]] ... DEFAULT ROLE role [, role ] ... [REQUIRE {NONE | tls_option [[AND] tls_option] ...}] [WITH resource_option [resource_option] ...] [password_option | lock_option] ... user: (see Section 6.2.4, “Specifying Account Names”) auth_option: { IDENTIFIED BY 'auth_string' | IDENTIFIED WITH auth_plugin | IDENTIFIED WITH auth_plugin BY 'auth_string' | IDENTIFIED WITH auth_plugin AS 'auth_string' }

Examples Create User in MySQL:
Continue reading Create User in MySQL