mysql 디비 계정생성및 권한설정
페이지 정보

본문
mysql 5.5 user, 데이터베이스 생성, 사용자 추가, 삭제
*참고사항: 로컬에서 접속시 localhost 권한도 추가 해야 한다.
유저 생성
create user 'userId'@'%' identified by 'userpassword';
*권한 위임
mysql> grant all privileges on *.* to '계정'@'localhost'identified by '비번'
모든 DB 로컬에서만 접속
mysql> grant all privileges on *.* to '계정'@'%' identified by '비번' with grant option
원격에서 접속가능
*권한 보기
# show grants for '계정'@'localhost'
*권한 적용
# flush privileges
*user 삭제
# drop user '계정'@'localhost';
참고: 계정생성 풀어서 쓴 것
grant all privileges on 디비명.테이블명 to '계정'@'%' identified by '비번' with grant option
root 계정 외부접속 허용
grant all privileges on *.* to 'root'@'%' identified by '비밀번호';
*참고사항: 로컬에서 접속시 localhost 권한도 추가 해야 한다.
유저 생성
create user 'userId'@'%' identified by 'userpassword';
*권한 위임
mysql> grant all privileges on *.* to '계정'@'localhost'identified by '비번'
모든 DB 로컬에서만 접속
mysql> grant all privileges on *.* to '계정'@'%' identified by '비번' with grant option
원격에서 접속가능
*권한 보기
# show grants for '계정'@'localhost'
*권한 적용
# flush privileges
*user 삭제
# drop user '계정'@'localhost';
참고: 계정생성 풀어서 쓴 것
grant all privileges on 디비명.테이블명 to '계정'@'%' identified by '비번' with grant option
root 계정 외부접속 허용
grant all privileges on *.* to 'root'@'%' identified by '비밀번호';
- 이전글ERROR 1040 (08004): Too many connections 20.11.24
- 다음글mysql 패스워드 분실시 20.11.24
댓글목록
등록된 댓글이 없습니다.