티스토리 뷰
https://github.com/clucle/cpp_mysql_vs2019
1. Download MySQL & make database
download MySQL
https://dev.mysql.com/downloads/installer/
After installation, Open Workbench. Connect Mysql.
2. Download MySQL Connector8.0
download MySQL Connector cpp (current version 8.0 2020.01.20)
https://dev.mysql.com/downloads/connector/cpp/
Download zip file. Decompression zip file.
3. Download Boost & Install
(current version 1.72)
https://www.boost.org/doc/libs/1_72_0/more/getting_started/windows.html
You need to install as well as download (stage folder build by b2)
4. Set Environment variables
Set BOOST_ROOT & MYSQL_ROOT
5. Visual Studio Settings
6. Copy Dll File
Copy & Paste 4 files.
7. Run Code
#include <stdlib.h>
#include <iostream>
#include <jdbc/cppconn/driver.h>
#include <jdbc/cppconn/exception.h>
#include <jdbc/cppconn/resultset.h>
#include <jdbc/cppconn/statement.h>
using namespace std;
int main(void)
{
sql::Driver* driver;
sql::Connection* con;
driver = get_driver_instance();
con = driver->connect("tcp://127.0.0.1:3306", "your_id", "your_password");
con->setSchema("sampledatabase");
delete con;
cout << endl;
return EXIT_SUCCESS;
}
'개발 > 일상' 카테고리의 다른 글
c++ shared_ptr not thread-safe (0) | 2020.06.27 |
---|---|
Scheduler와 Dispatcher의 차이 (0) | 2020.04.15 |
2020 넷마블 신입공채 '넷마블 네오 게임 서버' 최종 합격 후기 (7) | 2019.12.17 |
c++ shared_ptr, enable_shared_from_this (0) | 2019.11.19 |
네트워크 면접 공부자료 (0) | 2019.11.18 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- set value
- 에러 위치 찾기
- RVO
- it's called a vrpit
- 면접
- Visual Studio
- vrpit
- 봄날에 스케치
- chrome-extension
- hole-punching
- 영상 픽셀화 하기
- 카카오
- cockroach db
- red underline
- Quest2
- Reciprocal n-body Collision Avoidance
- 코어 남기기
- 우리는 vr핏이라고 부릅니다
- mysql
- print shared_ptr class member variable
- C++
- 클래스 맴버 변수 출력하기
- shared_from_this
- Obstacle Avoidance
- boost
- vr핏
- SuffixArray
- 잘못된 빨간줄
- Golang
- ad skip
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함