mysql8로 버전업이 됨에 따라 기존에 사용중이던 hibernate, mysql-connector-java등 version을 올리고 관련 conf수정하였다

수정 부분 요약.

  1. pom.xml
    hibernate.version=5.3.1.Final
    (hibernate-entitymanager 삭제, hibernate-validator 추가 )

  2. application.properties
    hibernate.dialect=org.hibernate.dialect.MySQL8Dialect

  3. mysql8.0 user 권한부여

구체적인 내용.

  1. pom.xml 1.8 0.0.1
     <properties>
         <java.version>1.8</java.version>
         <twig-service.version>0.0.1</twig-service.version>
-        <hibernate.version>5.0.3.Final</hibernate.version>
+        <hibernate.version>5.3.1.Final</hibernate.version>
         <hibernate-javax-persistence.version>1.0.0.Final</hibernate-javax-persistence.version>
         <commons-configuration.version>1.10</commons-configuration.version>
-        <mariadb-java-client.version>1.3.0</mariadb-java-client.version>
+        <mariadb-java-client.version>2.4.1</mariadb-java-client.version>
         <querydsl.version>4.1.4</querydsl.version>
         <spring-data-mock.version>1.1.4</spring-data-mock.version>
+       <hibernate.validator.version>6.0.10.Final</hibernate.validator.version>
     </properties>

-       <dependency>
-            <groupId>org.hibernate</groupId>
-             <artifactId>hibernate-entitymanager</artifactId>
-             <version>${hibernate.version}</version>
-       </dependency>
+       <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+           <version>${hibernate.validator.version}</version>
+       </dependency>
        <dependency>
             <groupId>mysql</groupId>
             <artifactId>mysql-connector-java</artifactId>
-            <version>5.1.37</version>
+            <version>8.0.16</version>
        </dependency>

 

  1. application.properties
    hibernate.dialect=org.hibernate.dialect.MySQL8Dialect

  2. mysql설정

    - 아래와 같이 mysql conf수정
     default password plugin 설정 추가

    [mysqld]
    default-authentication-plugin=mysql_native_password

       - mysql 내 계정 생성시 문법 변경 및 인증 타입 명시  
         grant 에는 identified 삭제  
         create 시에 with mysql\_native\_password 추가

 create user 'mydb'@'%' IDENTIFIED WITH mysql_native_password BY 'YOURPASSWORD';
 GRANT ALL PRIVILEGES on mydb.* to 'myuser'@'%' WITH GRANT OPTION;

+ Recent posts