重启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;