How to create User in MySQL Server
To create user in MySQL , you can use mysql command line or we can use Graphical tools such as MySQL Workbench.
Syntax:
MySQL > Create User 'UserName'@'Server' IDENTIFIED BY 'YourPassword';
MySQL > Create user 'Aamir'@'localhost' Identified by ' Aamir$Password';
In case , the user would like to connect to MySQL server from another machine, we have to provide the ip of that machine. Let's say if the ip of machine from which user Aamir would like to connect to MySQL is 10.0.0.5 then our create statement will look below.
MySQL > Create user 'Aamir'@'10.0.0.5' Identified by ' Aamir$Password';
To check if the user has been created successfully, we can run below statement in MySQL.
MySQL > Select host, user from mysql.user;
How to create user in MySQL Server on Windows and on Linux
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.