CoderZone.org

Category: >> mySQL >> Add new user Bookmark and Share

<< lastnext >>

Snippet Name: Add new user

Description: Example of adding a new mySQL user at the mySQL command prompt.

Comment: (none)

Author: CoderZone
Language: MYSQL
Highlight Mode: MYSQL
Last Modified: February 28th, 2009

INSERT INTO user 
 
     (host, user, password, select_priv, 
     insert_priv, update_priv, delete_priv, 
     drop_priv, create_priv) 
     VALUES 
     ('localhost', 'UserName', PASSWORD('ThePassword'), 
     'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
 
-- always flush privileges 
-- after adding a user 
FLUSH PRIVILEGES;
 
 
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© coderzone.org | users online: 7