Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 30-09-2009
Member
 
Join Date: Aug 2009
Posts: 27
How to create a new user and password in mysql?

Can any one tell me how to create a new user and password in mysql? When user connect to the local database server as user root it will ask for password. Any recommendations and suggestions are appreciated.
Reply With Quote
  #2  
Old 30-09-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: How to create a new user and password in mysql?

For adding a new user to MySQL you just need to add a new entry to user table in database mysql. You need to use command mysql> INSERT INTO user in () declare the variable and in values assign the value for the variable.
Reply With Quote
  #3  
Old 30-09-2009
Member
 
Join Date: Jan 2009
Posts: 199
Re: How to create a new user and password in mysql?

You can also specify other privileges to a new user by setting the values of these columns in user table to 'Y' when executing the INSERT query : Select_priv, Insert_priv, Update_priv. To create a user who has access from all machines in a given domain, you can use the “%” wildcard character in the host part of the account name.
Reply With Quote
  #4  
Old 30-09-2009
Member
 
Join Date: Dec 2008
Posts: 177
Re: How to create a new user and password in mysql?

To create user in mysql :
Code:
CREATE USER 'user20'@'localhost' IDENTIFIED BY 'pass1';
You can create a new MySQL user in one step using GRANT command :
Code:
GRANT ALL ON *.* TO 'user21'@'localhost' IDENTIFIED BY 'pass1';
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to create a new user and password in mysql?"
Thread Thread Starter Forum Replies Last Post
How to reset User Password via single user mode in mac os x Jay Scott Operating Systems 3 10-11-2010 07:00 PM
How to Create and Change Password, Picture and User Name in Windows 7? Jagruti23 Operating Systems 4 12-08-2010 04:33 PM
Create Disk in case of user password loss Enriquee Windows Software 3 12-11-2009 10:05 PM
Mysql Error : Can't connect to local mysql server through socket ' var lib mysql mysql.sock' 2 roshan45 Software Development 3 07-11-2009 09:36 PM
domain user password expired but user not prompted to change passw GunTher Active Directory 1 28-07-2008 11:53 AM


All times are GMT +5.5. The time now is 04:01 PM.