Client must log in the MySQL as a user.
MySQL uses user for permission of operations.
- Only a user called
- The user information is stored in
usertable of database
USE mysql; DESC user; SELECT HOST,USER FROM user;
Create a User¶
CREATE USER some_user IDENTIFIED BY 'some_password';
New user cannot log in due to the lack of privileges.
Delete a User¶
DROP USER some_user;
Rename a User¶
RENAME USER some_old_user TO some_new_user;
SET PASSWORD = 'some_auth_string'; SET PASSWORD FOR 'some-user'@'localhost' = 'some_auth_string';