CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
Notice. The ‘localhost’ means the accessible scope of the user is limited to the localhost.
If your user account needs to be accessible from any IP address, change ‘localhost’ to ‘%’.
CREATE USER 'user'@'%' IDENTIFIED BY 'password';
Delete a user
DROP USER 'user'@localhost;