* 데이터베이스 생성
mysql> create database <database name>;
mysql> show databases;
mysql> create database <database name>;
mysql> show databases;
* 사용자 추가
mysql> use mysql
mysql> INSERT INTO user
VALUES('%','monty',PASSWORD('some_pass'),
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y',
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y',
'','','','',0,0,0,0);
mysql> use mysql
mysql> INSERT INTO user
VALUES('%','monty',PASSWORD('some_pass'),
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y',
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y',
'','','','',0,0,0,0);
* 사용자 권한 변경
mysql> use mysql
mysql> INSERT INTO db
(Host,Db,User,Select_priv,Insert_priv,
Update_priv,Delete_priv,Create_priv,Drop_priv)
VALUES('%','<db_name>','<user_id>',
'Y','Y','Y','Y','Y','Y');
- 권한정보 반영
mysql> FLUSH PRIVILEGES;
댓글 없음:
댓글 쓰기