Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Upload mysql dump into database

$
0
0
Hi.  I am using Liquibase in a Dropwizard java project with Gradle.  I have attempted to load a mysql dump via several different approaches, none of which have been successful.  I'd very much appreciate some guidance on how someone else managed to upload a sql dump.

... attempt 1
<sqlFile dbms="mysql" endDelimiter=";;" path="sql/schema-init.sql"/>


... attempt 2
<executeCommand executable="mysql">
<arg value="-u user"/>
<arg value="-password=password>"/>
<arg value="-h hostname"/>
<arg value="-P 3306"/>
<arg value="db schema name < ./sql/schema-init.sql"/>
</executeCommand>

.. attempt 3
<executeCommand
executable="../sql/init.sh"/>

attempt 1 was to run the mysqldump as a sql file.  It seems that Liquibase had too many issues with the way the sql dump tables were ordered. 

attempt 2 was to use an executeCommand.  The error returned was that the last arg cannot contain the < character needed by mysql to signify upload.

attempt 3 a last ditch attempt to point to a bash script to perform the upload for me
mysql -u hthu --password=password -h db.hthu.provata.app -P 3306 hthu-eligibility < ./schema-init.sql
it failed on account of not being able to see the bash file in the adjacent directory.  Can Liquibase not handle relative paths?
 Cannot run program "../sql/init.sh": error=2, No such file or directory




Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>