Connector/C++ 라이브러리를 사용해 MySQL을 연결해보자.
https://dev.mysql.com/downloads/connector/cpp/
MySQL :: Download Connector/C++
MySQL Connector/C++ provides developers a JDBC-like API driver for MySQL. MySQL Connector/C++ 8.0 and higher is compatible with all MySQL versions starting with MySQL 5.7. Additionally, MySQL Connector/C++ 8.0 and higher supports the new X DevAPI for devel
dev.mysql.com
위 링크로 가면 3개의 파일을 다운로드 받을 수 있다. ( 2025 - 06 - 25 기준 )
1. Windows (x86, 64-bit), MSI Installer
2. Windows (x86, 64-bit), ZIP Archive
3. Windows (x86, 64-bit), ZIP Archive Debug Binaries
기본적으로 첫번째 파일로 Connector을 설치한 후 아래 작업을 해야 사용할 수 있다.
나머지 2개는 각각 Release, Debug용 정적라이브러리와 동적라이브러리를 포함하는 파일이다.
Visual Studio에서 이 파일을 사용하기 위해 추가 디렉터리를 설정해보자.
include 설정
lib 설정
동적 라이브러리 추가(.dll)
위처럼 구성하면 Connector를 c++에서 사용할 수 있다.
'데이터베이스' 카테고리의 다른 글
[DATABASE] 트랜잭션 예시 ( 채팅 서버 ) (0) | 2025.06.25 |
---|---|
[DATABASE] Prisma Transaction ( [게시판 프로젝트] 회원가입 적용, 사용자 히스토리 테이블 생성해 적용해보기 ) (0) | 2024.09.11 |
[DATABASE] 트랜잭션 ( Transaction ) (1) | 2024.09.11 |
[DATABASE] ORM과 Prisma (0) | 2024.09.06 |
[DATABASE] Raw Query (0) | 2024.09.06 |