[MySQL/EC2] EC2 MySQL 외부(DataGrip) 접속
·
Server/기타
* 이미 인스턴스에 mysql 관련 기본 세팅은 되어 있는 상태  1. 우선 aws > ec2 > 보안그룹으로 간다.  2. 인바운드 규칙에 MySQL도 추가한다.  3. aws 인스턴스에 들어간다.  4. root 권한을 부여한다.sudo su  5. mysql.conf.d 있는 곳으로 이동한다.cd /etc/mysql/mysql.conf.d  6. mysql.conf.d를 연다.vi mysqld.cnf  7. bind-address가 127.0.0.1로 되어 있는데 이를 0.0.0.0으로 바꾼다.  8. mysql을 재실행한다.service mysql restart  9. Datagrip에서 root로 접속하려고 하면 거부한다.  10. test 유저를 만든다. (test 말고 다른 이름 가능)CRE..
[spring] Cannot resolve method 'assertThat' in 'Assertions'
·
Server/spring
아래의 코드 블럭을 사용하려니 에러가 떳다.package hello.core.member;import org.junit.jupiter.api.Assertions;import org.junit.jupiter.api.Test;public class MemberServiceTest { MemberService memberService = new MemberServiceImpl(); @Test void join(){ // given Member member = new Member(1L, "memberA", Grade.VIP); // when memberService.join(member); Member findMember = memb..
[파이참/Pycharm] parameters/argument(args) 입력받는 방법
·
공부/파이썬
1. 오른쪽 상단 박스를 클릭 -> Edig Configurations로 이동  2. 실행하고자 하는 파일 선택 3. parameters에 입력
[spring] DB 연동
·
Server/spring
나는 mysql을 쓴다.  1. 내가 쓸 스키마를 확인한다.나는 abcd를 쓸거다.  2. build.gradle에 mysql관련 있는지 확인dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.mysql:mysql-connector-j' // 여기 annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springfra..
[spring] Dependency requires at least JVM runtime version 17. This build uses a Java 8 JVM
·
Server/spring
https://start.spring.io/  위 링크를 토대로 프로젝트를 생성하고 실행하니 아래와 같은 에러가 떳다. A problem occurred configuring root project 'spring'. > Could not resolve all artifacts for configuration ':classpath'.    > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.3.4.      Required by:          root project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.3.4       > Dependen..
[node.js] Error calling ChatGPT API: RateLimitError: 429 You exceeded your current quota, please check your plan and billing details.
·
Server/node.js
잘 작성한 줄 알았는데 테스트 해보니 다음과 같은 에러가 났다. 터미널에서는 다음과 같이 떳다.Error calling ChatGPT API: RateLimitError: 429 You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.  링크를 타고 가니 아래와 같은 정보를 확인할 수 있다.  더 찾아보니 돈이 없어서 였다.  지금은 무조건 결제해야 이용이 가능한가보다.아래 글을 통해 알게 되었다...https://velo..
[node.js] The requested module 'openai' does not provide an export named 'Configuration'
·
Server/node.js
import { config } from 'dotenv';import { Configuration, OpenAIApi } from 'openai';config();export const callChatGPT = async (prompt) => { const configuration = new Configuration({ apiKey: process.env.OPENAI_API_KEY, }); try { const openai = new OpenAIApi(configuration); const response = await openai.createChatCompletion({ model: "gpt-3.5-turbo", messages: [{ role: "user", c..
[node.js] 서버 API 만들기
·
Server/node.js
0. 목표 API예 : 나는 사용자 정보 조회 API를 만들어보겠다.   구조 :    .env :DB_HOST=localhostDB_PORT=3306DB_USER=rootDB_PASSWORD =DB_NAME =DB_TABLE =PORT = 3000NODE_ENV = development # production - 배포 모드, development - 개발 모드    1. 관련 모듈 설치나는 미리 내게 필요한 모듈을 다 설치해두겠다.node -v npm -v npm init npm install -g yarnyarn -vnpm install express --save yarn add express npm install --save-dev @babe..