MySQL에 접속하려니까 Unable to connect to 3306 에러가 발생했다.
sql::Driver* driver = get_driver_instance();
std::unique_ptr<sql::Connection> conn(driver->connect(server, name, password)); // ERROR
로컬에 MySQL 서버는 켜져있고
GUI 툴로 접속되서 데이터 확인도 되고
cmd로 접속해서 데이터도 확인되는데 접속이 안됐다.
오늘도 두어시간 GPT와 삽질하며 헤매고 있는데
외국 형님 두분께서 도움을 주셨다.
스킵하며 보다보니 왜 릴리즈 모드에서 하는지 궁금했는데
스택오버플로우에서 해결해줬다.
ㅠㅠ...
디버그모드는 디버그모드용 라이브러리를 별도로 다운받아야한다.
참고)
https://stackoverflow.com/questions/76041337/mysql-c-connector8-jdbc-unable-connect-to-localhost
mysql c++ connector8 jdbc, unable connect to localhost
mysql -uroot -p123456 i can connect to mysql with a terminal. but when i use the mysql c++ connector with jdbc, it fails. The exception says "unable to connect to localhost".
stackoverflow.com
https://www.youtube.com/watch?v=a_W4zt5sR1M
'Study > 에러 정리' 카테고리의 다른 글
첫 번째 데드락 발생 (0) | 2024.09.04 |
---|---|
중단점 명령(__debugbreak() 문 또는 유사한 호출)이 에서 실행되었습니다. (0) | 2024.09.02 |
AcceptEx -> GetQueuedCompletionStatus 10038 에러 (0) | 2024.08.28 |
Postman과 iocp (0) | 2024.08.24 |
Google Protobuf 27.3 최신버전 설치하다 폐기 (0) | 2024.08.20 |