修改my.cnf文件,加入
[mysqld]
bind-address = 0.0.0.0
重启MySQL,登陆进去之后执行如下语句
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '1q2w3e4r' WITH GRANT OPTION;
flush privileges;
修改my.cnf文件,加入
[mysqld]
bind-address = 0.0.0.0
重启MySQL,登陆进去之后执行如下语句
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '1q2w3e4r' WITH GRANT OPTION;
flush privileges;