| [ Up ] [ Link Farm ] [ Reload ] [ Top ] |
|
Getting started:
shell> mysql --user=root mysql
# using 'GRANT' adds a user
mysql> GRANT ALL PRIVILEGES ON *.* TO monty@localhost
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO monty@'%'
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT USAGE ON *.* TO 'beancounter'@'localhost' IDENTIFIED BY
'Acme543' ;
mysql> GRANT USAGE ON *.* TO 'beancounter'@'%' IDENTIFIED BY 'Acme543' ;
mysql> FLUSH PRIVILEGES;
-or-
shell> mysql -u root mysql
mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password');
mysql> FLUSH PRIVILEGES;
-or-
shell> mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('new_password')
-> WHERE user='root';
mysql> FLUSH PRIVILEGES;
-or-
shell> mysqladmin -u root password new_password
Lock a user out right now:
REVOKE ALL PRIVILEGES,GRANT FROM user_name [, user_name] ;
FLUSH PRIVILEGES;
See:
http://www.mysql.com/doc/en/Adding_users.html| Modified: Sun, 28 Aug 2005 20:40:57 -0400 Copyright © 2009 R P Herrold http://www.herrold.com/mysql/acl/ |