dev/MySQL
MySQL 계정 생성 및 권한 할당
amuse1991
2019. 2. 14. 15:05
CREATE USER '계정'@'localhost' IDENTIFIED BY '비밀번호'; #계정 생성, localhost 부분에 %를 적어주면 모든 경로에서 접근 가능
GRANT ALL ON 데이터베이스명.* TO '계정'@'localhost';
만약 mysql 8.0 이용시 java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.와 같은 에러가 난다면
alter user '계정'@'localhost' identified with mysql_native_password by '비밀번호';
flush privileges;