如何运行插入查询脚本(.sql)创建表和列或预填充一些数据 [英] How can i run a insert query script(.sql) to create tables and columns or pre populate few datas

查看:103
本文介绍了如何运行插入查询脚本(.sql)创建表和列或预填充一些数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用一些默认数据创建表和列,以便在CloudFoundry中运行Java Web应用程序。

I need to create tables and columns with some default data to run my Java web application in CloudFoundry.

我无法使用任何 MySQL客户端连接到我收到的数据库ip。

I am not able to use any MySQL client to connect to the database ip which I received.

java.lang.System.getenv("VCAP_SERVICES");

是否可以从STS或Eclipse连接到数据库,或者是否有VMware发布的任何客户端?

Is it possible to connect to the db from STS or Eclipse, or is there any client published by VMware?

推荐答案

您可以使用VMC cli工具创建通往MySQL服务的隧道。连接隧道后,您可以选择启动mysql客户端,该客户端将自动连接到实例。

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.

请参阅 http:// docs.cloudfoundry.com/tools/vmc/caldecott.html 中提供了在CloudFoundry上连接到MySQL服务的示例。

Please see http://docs.cloudfoundry.com/tools/vmc/caldecott.html for an example of connecting to a MySQL service on CloudFoundry.

这篇关于如何运行插入查询脚本(.sql)创建表和列或预填充一些数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆