본문 바로가기

전체 글143

[MySQL] MySQL user 목록, 추가 user 목록 확인 mysql 서버 실행 mysql.server start mysql 접속 mysql -u root -p mysql 기본 스키마인 mysql 사용 use mysql; user 확인 SELECT user, host FROM user; user 추가 user 추가 create user test@localhost identified by '1234'; 권한 부여 grant all privileges on *.* to test@localhost; user 목록 확인 참고 : https://velog.io/@taelee/mysql-user%ED%99%95%EC%9D%B8-%EB%B0%8F-%EC%B6%94%EA%B0%80 https://ssungkang.tistory.com/entry/MySQL-.. 2022. 8. 31.
[Spring] spring 프로젝트 MySQL 연결하기 build.gradle dependencies 추가 application.properties 설정 추가 # MySQL 설정 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver # JDBC URL of the database. # spring.datasource.url=jdbc:mysql://localhost:{port}/{DBname}?{options} spring.datasource.url=jdbc:mysql://localhost:3306/test_db?useSSL=false&allowPublicKeyRetrieval=true spring.datasource.username=test spring.datasource.password=1234 spr.. 2022. 8. 31.
[Spring] intellij build.gradle dependencies 추가하기 dependencies 에서 마우스 우클릭, Generate 클릭 Add dependency 추가할 dependency 검색 후 add Load Gradle Changes 참고 : https://velog.io/@dnwlsrla40/Intellij-intellij%EC%97%90%EC%84%9C-%EB%B0%94%EB%A1%9C-dependency-%EC%B6%94%EA%B0%80 2022. 8. 31.
[MySQL/AWS] MySQL 데이터베이스 엔진을 실행하는 RDS DB 인스턴스에 연결하기 1. MySQL command-line client 에서 연결 1-1) MySQL RDS DB 인스턴스의 데이터베이스에 연결하기 PROMPT> mysql -h -P -u -p 1-2) 위 명령어를 입력하면 Enter password: 가 뜸. 비밀번호 입력 1-3) 데이터베이스 리스트 보기 show databases; 1-4) chloe 데이터베이스 사용하기 use chloe 1-5) 테이블 리스트 보기 show tables; 2. MySQL Workbench에서 연결 2-1) Database > Manage Connections 클릭 2-2) Manage Server Connections 창에서 New 클릭 2-3) Connect to Database 창에서 다음 정보 입력 Connection Name.. 2022. 8. 30.