Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-19046

Possible problem with MySQL 8 an Artifactory

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Database
    • Labels:
      None

      Description

      Testing on my side shows that a blank install of the latest version of MySQL (MySQL 8) doesn't work with normal installations of Artifactory.

      I followed the standard spin up for MySQL on a standard Debian 9 Artifactory installation:

      1. Create database schema 
        Note: in MySQL 8 the "grant all" and "create user" commands must be separate

      CREATE DATABASE artdb CHARACTER SET utf8 COLLATE utf8_bin;

      CREATE USER 'artifactory'@'localhost' IDENTIFIED BY 'password';

      GRANT ALL ON artdb.* TO 'artifactory'@'localhost';

      2. Deploy the latest JDBC driver to /opt/jfrog/artifactory/tomcat/lib

      3. Observe failures creating tables:

      2019-04-19 16:40:32,327 [art-init] [INFO ] (o.a.s.ArtifactoryApplicationContext:498) - Artifactory application context set to NOT READY by refresh
      2019-04-19 16:40:32,331 [art-init] [INFO ] (o.a.s.ArtifactoryApplicationContext:238) - Refreshing artifactory: startup date [Fri Apr 19 16:40:32 UTC 2019]; root of context hierarchy
      2019-04-19 16:40:48,533 [art-init] [INFO ] (o.a.s.d.DbServiceImpl:236) - Database: MySQL 8.0.15. Driver: MySQL Connector/J mysql-connector-java-8.0.15 (Revision: 79a4336f140499bd22dd07f02b708e163844e3d5) Pool: mysql
      2019-04-19 16:40:48,534 [art-init] [INFO ] (o.a.s.d.DbServiceImpl:239) - Connection URL: jdbc:mysql://localhost:3306/artdb?characterEncoding=UTF-8&elideSetAutoCommits=true
      2019-04-19 16:40:48,694 [art-init] [INFO ] (o.a.s.d.DbServiceImpl:112) - **Creating database schema**
      2019-04-19 16:40:49,713 [art-init] [ERROR] (o.j.s.u.DbStatementUtils:60) - Failed to execute query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups (
      group_id BIGINT NOT NULL,
      group_name VARCHAR(64)' at line 1:
      CREATE TABLE groups (
      group_id BIGINT NOT NULL,
      group_name VARCHAR(64) NOT NULL,
      description VARCHAR(1024),
      default_new_user TINYINT,
      realm VARCHAR(255),
      realm_attributes VARCHAR(512),
      admin_privileges TINYINT,
      CONSTRAINT groups_pk PRIMARY KEY (group_id)
      )

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              patrickr Patrick Russell
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: