问题
I need to create tables and columns with some default data to run my Java web application in CloudFoundry.
I am not able to use any MySQL client to connect to the database ip which I received.
java.lang.System.getenv("VCAP_SERVICES");
Is it possible to connect to the db from STS or Eclipse, or is there any client published by VMware?
回答1:
you can use the VMC cli tool to create a tunnel to your MySQL service. When the tunnel is connected you can then opt to start a mysql client that will automatically connect to the instance.
Please see http://docs.cloudfoundry.com/tools/vmc/caldecott.html for an example of connecting to a MySQL service on CloudFoundry.
来源:https://stackoverflow.com/questions/10981512/how-can-i-run-a-insert-query-script-sql-to-create-tables-and-columns-or-pre-po