본문 바로가기 메뉴 바로가기

일상+

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

일상+

검색하기 폼
  • 분류 전체보기 (26)
    • Dev (23)
      • Spring (0)
      • elasticsearch (3)
      • Phython (1)
      • javascript (0)
      • frontend (1)
      • JPA (3)
      • Agile (0)
      • AWS (4)
      • Java (3)
      • Oracle (1)
      • 디자인패턴 (0)
    • 일상+ (2)
  • 방명록

db connect (1)
[PYTHON] DB 연결

spring에서는 application.propertiesspring.datasource.url=jdbc:mysql://localhost:3306/sample?uniCode=true&characterEncoding=utf8 python에서는 import pymysqlconn = pymysql.connect(host='localhost', port=3306, user='root', passwd='password', db='sample')cur = conn.cursor()cur.execute("select current_timestamp() from dual")print(cur.fetchone())cur.close() conn.close()

Dev/Phython 2017. 2. 3. 18:31
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • JPA
  • oracle12
  • StAX
  • OneToMany
  • timestamp
  • CloudSearch
  • ojdbc7
  • Elasticsearch
  • 단축키
  • #csvreader
  • could not initialize proxy - no Session
  • aws cloudsearch
  • iTerm
  • tomcat
  • Big xml 파싱
  • db connect
  • org.hibernate.LazyInitializationException
  • getdate
  • JoinColumn
  • 계층형
  • cloudsearch 비용
  • 서버 환경변수
  • 엘라스틱서치
  • JPA 오류
  • Python
more
«   2025/07   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바