계정생성 및 스키마생성
- 스키마를 mysql로 변경: use mysql;
- 관리자 로그인: mysql -u root; || mysql -uroot -p;
- 계정생성: create user 'id'@'%' identified by 'pw';
-> @'%': 외부에서의 접속을 허용한다는 설정(권한부여)
-> 특정 IP에서만 접속: 'IP.%'- 권한부여: grant all privileges on . to test@'%' identified by '비밀번호';
- 스키마 생성: create schema 스키마명;
- 저장하기: flush privileges;
스키마 변경: use 스키마명;
비밀번호 변경: alter user 'test2'@'%' identified with mysql_native_password by 'password123@';
계정삭제: delete from user where user='id';
권한제거: show grants for 'id'@'%';
권한 확인: show grants for test@'%';
계정정보 조회: select host, user, password from user;
포트 조회: mysql server status;
에러
code: 'ER_NOT_SUPPORTED_AUTH_MODE',
errno: 1251,
sqlMessage: 'Client does not support authentication protocol requested by server; consider upgrading MySQL client',
sqlState: '08004',
해결방법
비밀번호 변경 후 해결 test -> password123@
https://1mini2.tistory.com/88