Search Results for 'mysql'

ATOM Icon

1 POSTS

  1. 2008/05/21 MySQL 사용자 추가 by shiftkey

MySQL 사용자 추가




#mysql -u root -p

mysql>GRANT ALL PRIVILEGESE ON 데이타베이스명.테이블명 TO '아이디'@'호스트'

->IDENTIFIED BY '패스워드' ;

※ DB 생성

mysql> create database test_db;

※ 사용자 생성

1. 외부에서 접근할수 있게 하는 경우

mysql> GRANT ALL PRIVILEGES ON 'test_db'.* TO test_id@'%' <======== %는 모든 호스트를 의미함
-> IDENTIFIED BY 'test_passwd';
( grant all privileges on `id_db`.* to id@localhost identified by '1234' with grant option; )

mysql>flush privileges;



2. 내부에서 접속할수 있게 하는 경우

mysql> GRANT ALL PRIVILEGES ON test_db.* TO test_id@localhost <======== *는 모든 테이블을 의미함
-> IDENTIFIED BY 'test_passwd'; <======== localhost는 내부
mysql>flush privileges;

3. 권한 적용
권한을 변경한 경우 반드시 권한을 적용하여야 함(2가지 방법)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql>

% mysqladmin -u root -p reload
Enter password: XXXXXXXX



GRANT ALL PRIVILEGES on book.* TO book@localhost
IDENTIFIED by 'book123' with grant option;
GRANT ALL PRIVILEGES on storages.* TO storages@localhost
IDENTIFIED by 'storage123' with grant option;
flush privileges;





크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by shiftkey

2008/05/21 14:27 2008/05/21 14:27
,
Response
No Trackback , No Comment
RSS :
http://shiftkey.org/rss/response/147


블로그 이미지

Shiftkey가 살아가는 이런 저런 이야기......

- shiftkey

Notices

Archives

Authors

  1. shiftkey

Calendar

«   2012/05   »
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Site Stats

Total hits:
161246
Today:
27
Yesterday:
243