mysql开启远程访问
进入
mysql -uroot -h127.0.0.1-p
use mysql
新增一个用户
create user user02@'%' identified by 'password'
设置某个用户权限:update user set host='%' where user='yuancheng' and host='127.0.0.1';
flush privileges;
关闭授权
mysql -uroot -h127.0.0.1 -p
update user set host='127.0.0.1' where user='yuancheng' and host='%';
FLUSH PRIVILEGES;
exit; 退出
move on
posted on 2020-01-13 10:35 Helianthus720 阅读(67) 评论(0) 编辑 收藏 举报