【ComputeEngine】CentOS6でのMySQLの外部公開
Google Compute EngineでCentOS6のMySQLの外部公開の設定を行ったのでそのメモ。
ComputeEngineは月間無料枠もあるし、最安プランなら月5ドル程度なのでかなり良いと思ってます。
① MySQLで接続ユーザーの権限設定を行う
「Linux(CentOS)のMySQLへ外部接続する | 俺の開発研究所」
http://itmemo.net-luck.com/linux-centos-mysql-remote/
② CentOSでiptablesでポートを公開する
※ portが3306のとき
#iptablesの設定を編集
$ sudo vi /etc/sysconfig/iptables
# HTTP
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -jcreate database ACCEPT
#iptablesの再起動
$ sudo /etc/rc.d/init.d/iptables restart
③ ComputeEngineのファイアウォール設定を変更する
「Google Compute Engineのファイヤーウォールを理解する #gcpja | Developers.IO」
http://dev.classmethod.jp/cloud/gce-firewall/
ソースIP
0.0.0.0/0
ポート
tcp:3306
Author And Source
この問題について(【ComputeEngine】CentOS6でのMySQLの外部公開), 我々は、より多くの情報をここで見つけました https://qiita.com/HirotakaKikushima/items/fd225966ac1444db0c0f著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .