IT

리눅스 Mysql 계정 추가 하기

self log 2007. 2. 17. 16:44

리눅스 서버 관리 할려고 찾은거다.
스크랩 블로그에 스크랩 해놨다.
필요한 부분만 낼룸~

mysql> create database test2;
mysql> grant all privileges on test2.* to smson@localhost
identified by 'smson' with grant option;
mysql> FLUSH PRIVILEGES;

test2 는 database 명이고 smson : id, 'smson' : 비밀번호입니다. 님의 경우는 아래와 같이하면 사용자 계정을 생성할수 있습니다.

mysql> grant all privileges on testsql.* to tester@'%'
identified by 'tester에 해당하는 비밀번호' with grant option;

mysql> grant all privileges on testDB.* to test@localhost identified by '패스워드';

(출처 : 'mysql db생성후 db에 계정 링크시킬려고 하는데요 ;ㅁ;' - 네이버 지식iN)