时间:2021-07-01 10:21:17 帮助过:4人阅读
1,授权用户远程访问
grant all privileges on *.* to ‘username‘@‘%‘ identified by ‘password‘ with grant option;
flush privileges;
2,登录
mysql -u"username" -p"pwd" -hlocalhost -P3306
3,创建只读帐户
GRANT SELECT ON *.* TO ‘username_r‘@‘localhost‘ IDENTIFIED BY ‘pwd‘;
4,创建读写账户
GRANT ALL ON *.* TO ‘username_r‘@‘localhost‘ IDENTIFIED BY ‘pwd‘;
MySQL命令记录
标签:log sele 登录 ant word username blog 记录 host