Results 1 to 4 of 4

Thread: How to create a new user and password in mysql?

  1. #1
    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.

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    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.

  3. #3
    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.

  4. #4
    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';

Similar Threads

  1. How to reset User Password via single user mode in mac os x
    By Jay Scott in forum Operating Systems
    Replies: 3
    Last Post: 10-11-2010, 07:00 PM
  2. Replies: 4
    Last Post: 12-08-2010, 04:33 PM
  3. Create Disk in case of user password loss
    By Enriquee in forum Windows Software
    Replies: 3
    Last Post: 12-11-2009, 10:05 PM
  4. Replies: 3
    Last Post: 07-11-2009, 09:36 PM
  5. Replies: 1
    Last Post: 28-07-2008, 11:53 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,563,765.08821 seconds with 17 queries