select host, user, password from user : 사용중인 계정 조회
계정 생성
1 2
create user 'username'@'localhost' identified by 'password'; create user 'username'@'%' identified by 'password';
'username'@'localhost' : 로컬에서만 접근 가능
'username'@'%' : 외부 접근 모드 허용
권한 부여
1 2
grant all privileges on database.* to 'username'@'localhost' identified by 'password'; grant all privileges on database.* to 'username'@'%' identified by 'password';