upgrading failed on fresh install when database name is not 'kylo'

Description

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2019-06-07 14:26:58,869 ERROR main:SpringApplication:771 - Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'kyloUpgradeConfig': Unsatisfied dependency expressed through field 'liquibase'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [com/thinkbiganalytics/server/upgrade/liquibase/LiquibaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set classpath:com/thinkbiganalytics/db/changelog/0.8.1/nifi-flow-cache-cluster-sync2.xml::kylo_0.8.1-nifi-flow-cache-mediumtext::sr186054:
Reason: liquibase.exception.DatabaseException: (conn:321) ALTER command denied to user 'kylo'@'localhost' for table 'nifi_flow_cache_update_item'
Query is : ALTER TABLE kylo.NIFI_FLOW_CACHE_UPDATE_ITEM MODIFY UPDATE_VALUE MEDIUMTEXT [Failed SQL: ALTER TABLE kylo.NIFI_FLOW_CACHE_UPDATE_ITEM MODIFY UPDATE_VALUE MEDIUMTEXT]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134)
at com.thinkbiganalytics.server.upgrade.KyloUpgrader.upgrade(KyloUpgrader.java:57)
at com.thinkbiganalytics.server.KyloServerApplication.main(KyloServerApplication.java:76)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [com/thinkbiganalytics/server/upgrade/liquibase/LiquibaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set classpath:com/thinkbiganalytics/db/changelog/0.8.1/nifi-flow-cache-cluster-sync2.xml::kylo_0.8.1-nifi-flow-cache-mediumtext::sr186054:
Reason: liquibase.exception.DatabaseException: (conn:321) ALTER command denied to user 'kylo'@'localhost' for table 'nifi_flow_cache_update_item'
Query is : ALTER TABLE kylo.NIFI_FLOW_CACHE_UPDATE_ITEM MODIFY UPDATE_VALUE MEDIUMTEXT [Failed SQL: ALTER TABLE kylo.NIFI_FLOW_CACHE_UPDATE_ITEM MODIFY UPDATE_VALUE MEDIUMTEXT]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1631)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583)
... 19 more
Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set classpath:com/thinkbiganalytics/db/changelog/0.8.1/nifi-flow-cache-cluster-sync2.xml::kylo_0.8.1-nifi-flow-cache-mediumtext::sr186054:
Reason: liquibase.exception.DatabaseException: (conn:321) ALTER command denied to user 'kylo'@'localhost' for table 'nifi_flow_cache_update_item'
Query is : ALTER TABLE kylo.NIFI_FLOW_CACHE_UPDATE_ITEM MODIFY UPDATE_VALUE MEDIUMTEXT [Failed SQL: ALTER TABLE kylo.NIFI_FLOW_CACHE_UPDATE_ITEM MODIFY UPDATE_VALUE MEDIUMTEXT]
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:619)
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:79)
at liquibase.Liquibase.update(Liquibase.java:214)
at liquibase.Liquibase.update(Liquibase.java:192)
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:431)
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:388)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1689)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1627)
... 29 more
Caused by: liquibase.exception.DatabaseException: (conn:321) ALTER command denied to user 'kylo'@'localhost' for table 'nifi_flow_cache_update_item'
Query is : ALTER TABLE kylo.NIFI_FLOW_CACHE_UPDATE_ITEM MODIFY UPDATE_VALUE MEDIUMTEXT [Failed SQL: ALTER TABLE kylo.NIFI_FLOW_CACHE_UPDATE_ITEM MODIFY UPDATE_VALUE MEDIUMTEXT]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:309)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:113)
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1277)
at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1259)
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:582)
... 37 more
Caused by: java.sql.SQLSyntaxErrorException: (conn:321) ALTER command denied to user 'kylo'@'localhost' for table 'nifi_flow_cache_update_item'
Query is : ALTER TABLE kylo.NIFI_FLOW_CACHE_UPDATE_ITEM MODIFY UPDATE_VALUE MEDIUMTEXT
at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:139)
at org.mariadb.jdbc.internal.util.ExceptionMapper.getException(ExceptionMapper.java:101)
at org.mariadb.jdbc.internal.util.ExceptionMapper.throwAndLogException(ExceptionMapper.java:77)
at org.mariadb.jdbc.MariaDbStatement.executeQueryEpilog(MariaDbStatement.java:224)
at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:253)
at org.mariadb.jdbc.MariaDbStatement.execute(MariaDbStatement.java:266)
at sun.reflect.GeneratedMethodAccessor372.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114)
at com.sun.proxy.$Proxy33.execute(Unknown Source)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:307)
... 42 more
Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: ALTER command denied to user 'kylo'@'localhost' for table 'nifi_flow_cache_update_item'
Query is : ALTER TABLE kylo.NIFI_FLOW_CACHE_UPDATE_ITEM MODIFY UPDATE_VALUE MEDIUMTEXT
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readErrorPacket(AbstractQueryProtocol.java:1098)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1030)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:985)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:129)
at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:243)
... 49 more
2019-06-07 14:26:58,875 ERROR main:KyloServerApplication:79 - Error during upgrade: Error creating bean with name 'kyloUpgradeConfig': Unsatisfied dependency expressed through field 'liquibase'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [com/thinkbiganalytics/server/upgrade/liquibase/LiquibaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set classpath:com/thinkbiganalytics/db/changelog/0.8.1/nifi-flow-cache-cluster-sync2.xml::kylo_0.8.1-nifi-flow-cache-mediumtext::sr186054:
Reason: liquibase.exception.DatabaseException: (conn:321) ALTER command denied to user 'kylo'@'localhost' for table 'nifi_flow_cache_update_item'
Query is : ALTER TABLE kylo.NIFI_FLOW_CACHE_UPDATE_ITEM MODIFY UPDATE_VALUE MEDIUMTEXT [Failed SQL: ALTER TABLE kylo.NIFI_FLOW_CACHE_UPDATE_ITEM MODIFY UPDATE_VALUE MEDIUMTEXT]
2019-06-07 14:26:58,875 ERROR main:KyloServerApplication:80 - ***** Upgrading failed *****

Environment

None

Status

Assignee

Unassigned

Reporter

简传挺

Labels

Reviewer

None

Story point estimate

None

Components

Priority

Highest