Announcement Announcement Module
Collapse
No announcement yet.
mysqldump and DataSourceInitializer Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • mysqldump and DataSourceInitializer

    Hi,
    I'm trying to initialize my database using the jdbc:initialize-database bean (in an effort to try out cloudfoundry). Problem is my data comes from a venerable mysql 5.0 database.
    I export using
    Code:
    mysqldump --ignore-table=cjd.image --no-create-db --no-create-info --skip-extended-insert [..]
    but it keeps giving me com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorEx ception
    My syntax is just fine using mysql command line tool, sadly not available on cloudfoundry..

    Cheers

  • #2
    from Spring class documentaion:

    InitializeDatabaseBeanDefinitionParser: Picks up nested {@code script} elements and configures a {@link ResourceDatabasePopulator} for them.

    ResourceDatabasePopulator: Populates a database from SQL scripts defined in external resources.

    If you look at the code in (ResourceDatabasePopulator) it essentially excutes sql statements. So the the script file in jdbc:initialize-database should just contain sql statements

    Since mysqldump is not an sql statment that could be executed using a jdbc driver, you are getting my sql syntax exception

    Comment

    Working...
    X