登录远程数据库:
mysql -h192.168.1.106 -uroot -p123
创建用户admin:
CREATE USER 'admin'@'%' IDENTIFIED BY '07fa533360d9';
修改admin用户密码:
update mysql.user set authentication_string=password('新密码') where user='admin';
刷新信息:
flush privileges;
授权指定数据库读写权限:
grant all privileges on 想授权的数据库.* to 'admin'@'%';