使用初始密码登录MysqL,并修改密码,同时设置root可以远程连接
命令如下:
cat /root/.MysqL_secret
cd /usr/local/MysqL/bin
./MysqL -u root -p
set password =password('新密码');
GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "1新密码";
flush privileges;
可能远程连接不了,尝试关闭防火墙,命令如下:
service iptables stop
setenforce 0