Results 1 to 2 of 2

Thread: mysqldump and DataSourceInitializer

  1. #1
    Join Date
    Feb 2010
    Posts
    2

    Default 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. #2

    Default

    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
    -- Prasanna Talakani
    Blog

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •