重啓MySQL
service mysql stop
service mysql start
service mysql restart
創建MySQL用戶並允許遠程訪問
CREATE USER 'terwer'@'%' IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON *.* TO 'terwer'@'%' WITH GRANT OPTION;
flush privileges;
關閉防火牆
systemctl stop firewalld;
systemctl stop iptables;