MySQLSyntaxErrorException: Table already exists

Certified Lead Developer

I'm attempting to migrate from a local 7.5 windows installation to a (new) local 7.6 linux installation. I am also migrating the mysql database from the same previous windows host to the new linux host. I get the following error in the jboss log when trying to start the server for the first time:

17:03:09,825 INFO [stdout] (ServerService Thread Pool -- 57) 2014-09-03 17:03:09,822 [ServerService Thread Pool -- 57] INFO com.appiancorp.rdbms.config.PrimaryDataSourceConfig - Validating and initializing the primary data source: jdbc/app72primary
17:03:12,636 INFO [stdout] (ServerService Thread Pool -- 57) 2014-09-03 17:03:12,634 [ServerService Thread Pool -- 57] INFO com.appiancorp.rdbms.hb.DataSourceManagerHbImpl - [jdbc/app72primary] Checking schema and migrating if necessary (appian/db/changelog/db-changelog-master.xml)...
17:03:16,963 INFO [stdout] (ServerService Thread Pool -- 57) 2014-09-03 17:03:16,962 [ServerService Thread Po...

OriginalPostID-121114

OriginalPostID-121114

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    ...ol -- 57] ERROR liquibase - Error executing SQL CREATE TABLE `usr` (`id` BIGINT AUTO_INCREMENT NOT NULL, `username` VARCHAR(255) NOT NULL, CONSTRAINT `PK_USR` PRIMARY KEY (`id`), CONSTRAINT `usr_username_uc` UNIQUE (`username`)) engine=InnoDB
    17:03:16,963 INFO [stdout] (ServerService Thread Pool -- 57) com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'usr' already exists
    ... and so on for a bunch more tables like that.

    I did export/import the appian primary database, so all tables to exist with the migrated data from the old instance.
    It doesn't seem to detect that the db tables already exist.

    One odd thing is that is see both `DATABASECHANGELOG` and `databasechangelog` extant in the database after attempting the startup. same for 2 other tables DATABASECHANGELOGLOCK and DT_MODEL but not any others. Looks something related to case sensitivity. Tried setting lower_case_table_names on the linux box and no change. The old windows instance was ori...
Reply
  • 0
    Certified Lead Developer
    ...ol -- 57] ERROR liquibase - Error executing SQL CREATE TABLE `usr` (`id` BIGINT AUTO_INCREMENT NOT NULL, `username` VARCHAR(255) NOT NULL, CONSTRAINT `PK_USR` PRIMARY KEY (`id`), CONSTRAINT `usr_username_uc` UNIQUE (`username`)) engine=InnoDB
    17:03:16,963 INFO [stdout] (ServerService Thread Pool -- 57) com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'usr' already exists
    ... and so on for a bunch more tables like that.

    I did export/import the appian primary database, so all tables to exist with the migrated data from the old instance.
    It doesn't seem to detect that the db tables already exist.

    One odd thing is that is see both `DATABASECHANGELOG` and `databasechangelog` extant in the database after attempting the startup. same for 2 other tables DATABASECHANGELOGLOCK and DT_MODEL but not any others. Looks something related to case sensitivity. Tried setting lower_case_table_names on the linux box and no change. The old windows instance was ori...
Children
No Data