[mysqld] user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp language = /usr/share/mysql/English bind-address = 65.55.55.2 # skip-networking .... .. ....2.mysql> CREATE DATABASE foo;
mysql> GRANT ALL ON foo.* TO bar@'202.54.10.20' IDENTIFIED BY 'PASSWORD';
3.3306ポート空く
/sbin/iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT
最後ログインできるはず
$ mysql -u webadmin –h 65.55.55.2 –p
You can also use the telnet or nc command to connect to port 3306 for testing purpose:
OR
Sample outputs:
$ echo X | telnet -e X 65.55.55.2 3306
OR
$ nc -z -w1 65.55.55.2 3306
Sample outputs:
Connection to 65.55.55.2 3306 port [tcp/mysql] succeeded!
参考URL
0 件のコメント:
コメントを投稿