인프라/DB
-
MySQL 명령어인프라/DB 2021. 8. 15. 23:33
로그인 $ 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..