사용자 도구

사이트 도구


database:mysql:jdbc

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
database:mysql:jdbc [2016/03/28 17:36]
kwon37xi
database:mysql:jdbc [2018/05/14 18:49]
kwon37xi [JDBC Query Log]
줄 4: 줄 4:
   * JDBC URL for utf-8 : <code>jdbc:mysql://localhost:3306/DB명?useUnicode=true&characterEncoding=utf8</code>   * JDBC URL for utf-8 : <code>jdbc:mysql://localhost:3306/DB명?useUnicode=true&characterEncoding=utf8</code>
   * [[http://dev.mysql.com/doc/refman/5.6/en/connector-j-reference-configuration-properties.html|MySQL Connector/J Reference Configuration Properties]]   * [[http://dev.mysql.com/doc/refman/5.6/en/connector-j-reference-configuration-properties.html|MySQL Connector/J Reference Configuration Properties]]
 +
 +===== Schema =====
 +  * 일반적인 데이터베이스의 Schema 개념을 지원하지 않기 때문에 JDBC DatabaseMetaData 에서 schema 관련해서 항상 null 값이 반환되는 문제가 발생할 수 있다. catalog 개념을 사용해야 한다.[[https://forums.mysql.com/read.php?39,137564,137629#msg-137629|MySQL :: Re: catalog versus schema]]
 +
 +  > You're correct. For legacy reasons (including compatibility with ODBC, and SQL Server), JDBC's concept of "catalog" maps to MySQL's concept of "databases"
 +  > Starting in MySQL-4.1, "schema" is an alias for "database", but it doesn't act like a SQL-standard schema, so we don't support the concept in the JDBC driver. 
  
 ==== PreparedStatement 분석 ==== ==== PreparedStatement 분석 ====
줄 84: 줄 90:
   * ''logger=com.mysql.jdbc.log.Slf4JLogger'' : 로거 지정   * ''logger=com.mysql.jdbc.log.Slf4JLogger'' : 로거 지정
   * ''profileSQL=true''이면 로그로 모든 쿼리를 남기고 성능 지표도 함께 표시한다.   * ''profileSQL=true''이면 로그로 모든 쿼리를 남기고 성능 지표도 함께 표시한다.
 +
 +===== allowMultiQueries =====
 +  * MySQL JDBC는 기본적으로 하나의 SQL 실행 요청에 여러 SQL을 실행하는 것을 금지하고 있다.(세미콜론(;)으로 여러 SQL 전송 불가)
 +  * 실서비스에서는 사용하지 말고, 테스트시에 필요한 경우 ''allowMultiQueries''로 허용 가능하다.
 +  * ''allowMultiQueries=true''
  
 ===== Interceptor ===== ===== Interceptor =====
database/mysql/jdbc.txt · 마지막으로 수정됨: 2024/01/16 09:53 저자 kwon37xi