MySQLに接続するために、MySQL Workbench
(http://www-jp.mysql.com/products/workbench/)
を試してみたが、MySQLの接続はデフォルトでローカルのみなので、許可が必要
sqlコマンドで以下のように実行すれば、外部の特定ホストから接続できるようです。
mysql>grant all privileges on zabbix.* to zabbix@"192.168.29.41" identified by 'zabbix' wi th grant option;
また、全ホストからの接続を可能とする場合は、以下のようにすればいいようです。
mysql> grant all privileges on zabbix.* to zabbix@"%" identified by 'zabbix' with grant option; Query OK, 0 rows affected (0.00 sec)
[root@zabbix2 ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 354142 Server version: 5.1.67 Source distribution Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select user,host from mysql.user; +--------+-----------------+ | user | host | +--------+-----------------+ | root | 127.0.0.1 | | | localhost | | root | localhost | | zabbix | localhost | | | zabbix2.2.local | | root | zabbix2.2.local | +--------+-----------------+ 6 rows in set (0.02 sec) mysql> shuw datadases -> l -> Ctrl-C -- exit! Aborted [root@zabbix2 ~]# [root@zabbix2 ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 354176 Server version: 5.1.67 Source distribution Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | test | | zabbix | +--------------------+ 4 rows in set (0.00 sec) mysql> grant all privileges on zabbix.* to zabbix@"192.168.29.41" identified by 'zabbix' wi th grant option; Query OK, 0 rows affected (0.03 sec) mysql> select user,host from mysql.user; +--------+-----------------+ | user | host | +--------+-----------------+ | root | 127.0.0.1 | | zabbix | 192.168.29.41 | | | localhost | | root | localhost | | zabbix | localhost | | | zabbix2.2.local | | root | zabbix2.2.local | +--------+-----------------+ 7 rows in set (0.00 sec)
Views: 9
