星期四, 九月 23, 2004

MySql如何增加一个新用户或改密码.

SET PASSWORD FOR root@"%" = PASSWORD('xxxxx');

GRANT ALL PRIVILEGES ON *.* TO ehrm@"myhost" IDENTIFIED BY 'xxxxx' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO ehrm@"%" IDENTIFIED BY 'xxxxx' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO ehrm@localhost IDENTIFIED BY 'xxxxx' WITH GRANT OPTION;

FLUSH PRIVILEGES;