Creating a new MySQL user can be done by running the command below in MySQL shell:
CREATE USER 'new_user'@'localhost' IDENTIFIED BY 'user_password';
If you would like the user to allow remote connections, you can replace localhost with the IP address. For example:
CREATE USER 'new_user'@'12.34.56.78' IDENTIFIED BY 'user_password';
You can use a the wildcard % to allow remote connections from all hosts.
CREATE USER 'new_user'@'%' IDENTIFIED BY 'user_password';
Comments
Add comment