Snippet Name: Add new user
Description: Example of adding a new mySQL user at the mySQL command prompt.
Comment: (none)
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;
|