#CloudFoundry tip: use --skip-extended-insert with mysqldump when preparing a dump to import in a Cloud Foundry MySQL database through vmc tunnel

I tried importing my Wordpress blog database MySQL dump to Cloud Foundry using vmc tunnel.

mysqldump --opt generates extended insert statements, ie in my case, a 1.1 Mb one line statement inserting all blog posts into wp_posts. This is the right option for generating more compact backup files.
But when sourcing this sql dump from vmc tunnel, the tunnel connection breaks while executing this 1.1 Mb statement.
ERROR 2013 (HY000): Lost connection to MySQL server during query
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: xxx

Using mysqldump --opt --skip-extended-insert to generate the dump generates a slightly larger file (2.1 Mb instead of 1.8 Mb) but with single line statements for each record, which then gets processed flawlessly using vmc tunnel.
cf http://lists.mysql.com/mysql/208873

I guess similar tips apply to dumps of postgres or Mongodb as well, when you want to import data in a Cloud Foundry based service.

I hope this will help you import your data in Cloud Foundry.
Shared publiclyView activity