●データベース作成 [root@db2 admin]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 16 Server version: 5.0.77-log Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> create database aff; Query OK, 1 row affected (0.02 sec) mysql> grant all privileges on aff.* to mysql@192.168.2.103 identified by 'Gnke8d9C'; Query OK, 0 rows affected (0.00 sec) ●ユーザ確認 mysql> select * from db; +---------------+-----+-------+-------------+-------------+-------------+-------------+-------------+-----------+------------+-----------------+------------+------------+-----------------------+------------------+------------------+----------------+---------------------+--------------------+--------------+ | Host | Db | User | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Create_tmp_table_priv | Lock_tables_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Execute_priv | +---------------+-----+-------+-------------+-------------+-------------+-------------+-------------+-----------+------------+-----------------+------------+------------+-----------------------+------------------+------------------+----------------+---------------------+--------------------+--------------+ | 192.168.2.103 | aff | mysql | Y | Y | Y | Y | Y | Y | N | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | +---------------+-----+-------+-------------+-------------+-------------+-------------+-------------+-----------+------------+-----------------+------------+------------+-----------------------+------------------+------------------+----------------+---------------------+--------------------+--------------+ 1 row in set (0.00 sec) ●i-generationデータベースの構築 [root@db2 admin]# mysql -u root -p aff < aff.dump.nodata.20111121←Create文のSQLDUMP ●MySQLのクエリ出力設定 以下を/etc/my.cnfに追加する。 log=/var/log/mysql_querry.log