Q: How to create a new MySQL user?

MySQL user

Answer:

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'; 
    No comments found for this tutorial, be the first to leave a comment!

Answered by
Double

Last updated on
Aug 04, 2016

Share