設定 MySQL 設定檔
vi /etc/mysql/mysql.conf.d/mysqld.cnf
註解掉 bind-address = 127.0.0.1
mysql> grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
mysql> flush privileges;
設定防火牆
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
查詢防火牆
iptables -L -n
連線
mysql -h dev.domain.com -u root -p