# Liquibase failing while attempting to drop non-existent TMP\_% tables during generateChangeLog

**URL:** <https://forum.liquibase.org/t/liquibase-failing-while-attempting-to-drop-non-existent-tmp-tables-during-generatechangelog/3753>\
**Category:** General Discussion\
**Created:** [May 21, 2019, 12:15am UTC](https://forum.liquibase.org/t/liquibase-failing-while-attempting-to-drop-non-existent-tmp-tables-during-generatechangelog/3753 "2019-05-21T00:15:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomerShiloach](https://avatars.discourse-cdn.com/v4/letter/t/8edcca/32.png) [@TomerShiloach](https://forum.liquibase.org/u/TomerShiloach)\
**Post date:** [May 21, 2019, 12:15am UTC](https://forum.liquibase.org/t/liquibase-failing-while-attempting-to-drop-non-existent-tmp-tables-during-generatechangelog/3753/1 "2019-05-21T00:15:00Z")

</div>

Cross-posted from stack-overflow ([here](https://stackoverflow.com/questions/56157377/liquibase-failing-while-attempting-to-drop-non-existent-tmp-tables-during-gene "link to stackoverflow issue")):

Running&nbsp;

> liquibase generateChangeLog \> genChgLog.txt

with the following as my liquibase.properties,

> classpath=C:\Program Files (x86)\MySQL\MySQL Connector

&nbsp;J\mysql-connector-java-8.0.16.jar&nbsp;

> driver=com.mysql.cj.jdbc.Driver

> url=jdbc:mysql://{thisisnottheproblem,Iguarantee}&nbsp;

> username={it’sright}

> password={it’sright}

> referenceUrl=jdbc:mysql://{thisisnottheproblem,Iguarantee}

> referenceUsername={it’sright}&nbsp;

> referencePassword={it’sright}

> changeLogFile=databaseChangeLogSchema.mysql.sql

> diffTypes=tables,columns,views,primaryKeys,indexes,foreignKeys,sequences,data

> logLevel=debug

I am consistently getting the likes of this, output to the genChgLog.txt file:

> Starting Liquibase at Wed, 15 May 2019 15:37:32 CDT (version 3.6.3

> built at 2019-01-29 11:34:48) Unexpected error running Liquibase:

> liquibase.exception.DatabaseException:

> liquibase.exception.DatabaseException: Unknown table

> ‘TMP\_CTAWHBNCQVQMHSUU’ [Failed SQL: DROP TABLE TMP\_CTAWHBNCQVQMHSUU]

> liquibase.exception.LiquibaseException:

> liquibase.command.CommandExecutionException:

> liquibase.exception.DatabaseException:

> liquibase.exception.DatabaseException: Unknown table

> ‘TMP\_CTAWHBNCQVQMHSUU’ [Failed SQL: DROP TABLE TMP\_CTAWHBNCQVQMHSUU]

> … 30 common frames omitted

> &nbsp;

> &nbsp;

> For more information, please use the --logLevel flag

Each time I run it, it changes the name of the phantom TMP\_ tables (although they always begin with TMP\_ and then a string of apparently random characters).&nbsp; I don’t know where it’s getting these non-existent TMP\_ tables from that it wants to drop, but…is there some way to make it only attempt to drop them if they exist?&nbsp; Of potential note:&nbsp; it works fine if my only diffType is “tables”, “data”, or if I have both “tables” and “data” as diffTypes…otherwise, failure…

---

<div class="post-metadata">

**Author:** ![un1382561729492r88id](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@un1382561729492r88id](https://forum.liquibase.org/u/un1382561729492r88id)\
**Post date:** [May 21, 2019, 12:15am UTC](https://forum.liquibase.org/t/liquibase-failing-while-attempting-to-drop-non-existent-tmp-tables-during-generatechangelog/3753/2 "2019-05-21T00:15:00Z")

</div>

I don’t have all the details, but it appears this can happen when using a database user with insufficient permissions. I talked with someone who said that using a root level database user fixed this issue for them.

Steve Donie  
Principal Software Engineer  
Liquibase Community Engagement  
Datical, Inc. [http://www.datical.com/](http://www.datical.com/)
