CREATE USER 'user'@'host' IDENTIFIED BY 'password';
To create a user in mysql and assign grants, issue the following:
grant privilege on
Available privileges:
ALL [PRIVILEGES]
ALTER
CREATE
DELETE
DROP
FILE
INDEX
INSERT
PROCESS
USAGE
RELOAD
SELECT
SHUTDOWN
UPDATE
To revoke privileges:
revoke privilege on database.table from user
To revoke grant option:
revoke grant option on
To change a password:
UPDATE mysql.user SET Password=PASSWORD('password')
WHERE User='someuser';
View current user:
select user();
Show user permissions:
show grants for 'username'@'localhost';
http://www.tech-faq.com/reset-mysql-password.shtml
No comments:
Post a Comment