【"test"ユーザーが192.168.1.xxxから任意のDBに接続できように設定】
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select user,host from user;
+------------------+-----------+
| user | host |
+------------------+-----------+
| debian-sys-maint | localhost |
| test | localhost |
+------------------+-----------+
2 rows in set (0.02 sec)
>grant all privileges on データベース名.* to test@"192.168.1.%" identified by 'パスワード' with grant option ;
【my.cnfの変更】
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1 ← コメントアウト