MySql admin commands
Option 1 - New user, Dedicated commands
========
Option 2 - New user, Direct sql
========
Root privs
Ref: http://www.databasef1.com/tutorial/mysql-create-user.html
Option 1 - New user, Dedicated commands
========
CREATE USER 'user1'@'localhost' IDENTIFIED BY 'pass1';
GRANT SELECT,INSERT,UPDATE,DELETE ON *.* TO 'user1'@'localhost';
Option 2 - New user, Direct sql
========
INSERT INTO user (Host,User,Password,Select_priv,Insert_priv)
VALUES('%','user4',PASSWORD('pass3'),'Y','Y');
Root privs
GRANT ALL PRIVILEGES ON *.* TO 'user1'@'%'
GRANT ALL PRIVILEGES ON *.* TO 'user1'@'localhost'
FLUSH PRIVILEGES;
Ref: http://www.databasef1.com/tutorial/mysql-create-user.html
No comments:
Post a Comment