mysql 5.7
创建用户:
CREATE USER ‘jeffrey’@‘localhost’ IDENTIFIED BY ‘password’;
删除用户
DROP USER ‘jeffrey’@‘localhost’;
授权
GRANT ALL ON . TO ‘someuser’@‘somehost’ WITH GRANT OPTION;
允许root远程访问
update user set host = ‘%’ where user = ‘root’;
mysql 5.7
创建用户:
CREATE USER ‘jeffrey’@‘localhost’ IDENTIFIED BY ‘password’;
删除用户
DROP USER ‘jeffrey’@‘localhost’;
授权
GRANT ALL ON . TO ‘someuser’@‘somehost’ WITH GRANT OPTION;
允许root远程访问
update user set host = ‘%’ where user = ‘root’;