본문 바로가기

JSP

02. 예제 실행을 위한 데이터베이스 생성

MySQL에서 사용할 사용자 추가

grant퀴리는 MySQL DBMS에 계정을 추가할 때 사용하는 명령어로서,

기본구조는


grant [권한목록] on [데이터베이스] to [계정]@[서버] identifed by [암호]

localhost에서 접속하는 jspexam계정 암호는 jspex

grant select, insert, update, delete, create, drop

on chap12.* to 'jspexam'@'localhost' identified by 'jspex';

위와 동일하나 모든 서버에서 연결할 수 있도록 권한부여

grant select, insert, update, delete, create, drop

on chap12.* to 'jspexam'@'%' identified by 'jspex';

C:\>mysql -u jspexam -p chap12

EnterPassword: ****

mysql>show tables;