监听Ipv4端口:
修改配置文件,添加bind-address=0.0.0.0
增加用户:
CREATE USER 'user'@'%' IDENTIFIED BY 'password';
授权数据库:
grant all privileges on scott.* to 'user1'@'%';
修改密码:
set PASSWORD = PASSWORD('root');
update mysql.user set password=password('新密码') where user='user1';