MySQL ユーザの作成
/root # mysql -uroot -p ← MySQL にログイン Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 13 to server version: 4.0.25-Max Type 'help;' or '\h' for help. Type '\c' to clear the buffer. 全権限を持ったユーザの作成 ( 俺しか使わないから ) mysql> grant all privileges on hoge.* to hoge@localhost identified by 'xxxxx'; ←hoge ユーザの作成 Query OK, 0 rows affected (0.00 sec) 登録されたか確認 mysql> select user,host,password from mysql.user where user='hoge'; +------+-----------+------------------+ | user | host | password | +------+-----------+------------------+ | hoge | localhost | 31f851exxxxxxxx | +------+-----------+------------------+ 1 row in set (0.00 sec)
作成するユーザの権限を指定したい時はこちらを参考に http://dev.mysql.com/doc/refman/4.1/ja/grant.html