Tuesday, October 6, 2015

How to create a user in MySQL?

CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';

For 'user' you can give any name. 'localhost' should be the IP address of your machine. If you are going to work on your own machine then  you can keep localhost as it is. Or you can use '127.0.0.1'. If you want to work on other PC then you have to give the IP  address of that machine instead of 'localhost'.

For 'password' you can give any password.

No comments:

Post a Comment