$ mysql -uroot -p
添加用户并授权:
CREATE USER 'xp'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'xp'@'%';
FLUSH PRIVILEGES;
修改密码:
SET PASSWORD FOR 'xp'@'%' = PASSWORD('password');
取消授权并删除用户:
REVOKE ALL PRIVILEGES, GRANT OPTION ON *.* FROM 'xp'@'%';
DROP USER 'xp'@'%';
网友评论