The syntax for the CREATE USER statement in MySQL is:
Parameters or Arguments
The name of the database account that you wish to create.
Optional. Whether you specify it or not, the CREATE USER statement will behave the same.
The password to assign to user_name.
Let's look at how to create a user in MySQL using the CREATE USER statement.
In this example, the CREATE USER statement would create a new user called ao in the MySQL database whose password is 'autumn'.
Create more than one user
How can you create more than one user at a time in MySQL? You can use the CREATE USER statement to create multiple users by comma separating each user/password combinations.
This CREATE USER example would create two users in MySQL. The first user would be called ao with a password of 'autumn', and the second user would be called andersonk with a password of 'summer'.
Using Hash value for password
The examples above displayed a plaintext password. You also have the option of providing the hash value for the password (see the PASSWORD function).
This CREATE USER example would create a new user called ao in the MySQL database with a hash value of the password.