Centos7上,對MySQL5.7開啓遠程鏈接。mysql
1.修改/etc/my.cnfsql
[mysqld] validate_password=off
2.命令行進入mysqlbash
use mysql; GRANT ALL ON *.* TO root@'%' IDENTIFIED BY '密碼' WITH GRANT OPTION; flush privileges;
3.與防火牆有關tcp
firewall-cmd --zone=public --add-port=3306/tcp --permanent firewall-cmd --reload
4.在Navicat中鏈接就能夠了。命令行