-
로그인 $ mysql -u 유저_ID -p DB 사용 > use _DB명_ 테이블 정보 > desc _테이블명_
패스워드 변경
alter user '유저명'@'호스트' identified with mysql_native_password by '비밀번호'; alter user 'root'@'localhost' identified with mysql_native_password by '1111';
유저 생성
create user 'userid'@'%' identified by 'userpw'; //외부 접근 허용 create user 'userid'@'localhost' identified by 'userpw'; //내부 접근
데이터베이스 권한 부여
모든 권한 부여 GRANT ALL privileges ON DB명.* TO 아이디@locahost; GRANT ALL privileges ON DB명.* TO 아디디@'%';
'개발 > DB' 카테고리의 다른 글
[MySQL] OSError: mysql_config not found (2) 2021.08.18