如何在Google云端sql实例上创建数据库 [英] How to create database on google cloud sql instance

查看:124
本文介绍了如何在Google云端sql实例上创建数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何使用Cloud SQL创建数据库?当我使用MySQL时,我可以轻松地运行一个sql脚本在phpMyAdmin上创建它们。



我发现了一个



这完全是 >我想要做什么。我可以运行我的代码来创建一对数据库,并且它们将位于我的云SQL中,并且可以将我的appengine应用程序连接到我的cloudsql,并且可以按预期工作。



<但是,当我按照该网站上的说明进行操作时,我只能看到: .pngrel =nofollow noreferrer>



SQL提示符在哪里?如何在我的云计算实例上创建数据库?

用户/ 1128412 / juan-enrique-mu%C3%B1oz-zolotoochin> @ Juan EnriqueMuñozZolotoochin 说,2015年2月,现在可以使用新的开发者控制台,使我的原始答案(如下)过时。
$ b

h3>

打开您的项目,展开存储,然后点击云端SQL ,切换到 DATABASES 标签。从那里你可以使用新建数据库按钮来创建一个新的数据库。您还可以从那里删除数据库。



原始答案(现已过时)



这尚未实施新的云端控制台,你必须使用旧的api控制台。



首先到新项目的云端SQL部分(你在哪里)。然后在右下方有一个链接返回到原始控制台。如果你点击这个,你会看到一个与Cloud SQL稍有不同的控制面板。



如果你点击你要创建数据库的实例,你会得到另一个屏幕上有一个SQL Prompt选项卡,点击它,然后你就可以执行原始的SQL命令。


$ b

更新:到旧的API控制台和阻止重定向将您带到新控制台,请使用以下链接: https:// code.google.com/apis/console/b/0/?noredirect


How can I use Cloud SQL to create a database? When I use MySQL, I could easily run a sql script to create them on phpMyAdmin.

I found a site that advertises that it's possible to run SQL files right on Google Cloud SQL.

This is exactly what I want to do. I could run my code to create a couple databases, and they would be in my cloud SQL, and I could connect my appengine app to my cloudsql and it would work as expected.

But when I follow the instructions on that site, I only see this:

Where is the SQL prompt? How can I create databases on my cloud sql instance?

解决方案

As @Juan Enrique Muñoz Zolotoochin says, singe February 2015 it is now possible to manage databases using the new Developer Console, making my original answer (below) obsolete.

New Answer

Open your project, expand Storage and then Cloud SQL, switch to the DATABASES tab. From there you can use the New database button to create a new database. You can also delete databases from there.

Original Answer (Now obsolete)

This has not been implemented in the new Cloud Console yet, you have to use the old api's console for this.

To get to it first go to the Cloud SQL section of your project in the new console (where you are). Then in the bottom right there is a link "Return to original console". If you click on this you get to a slightly different control panel for Cloud SQL.

If you then click on the instance you want to create your database on, you will get another screen that has a "SQL Prompt" tab, click on that and then you can execute raw SQL commands against it.

UPDATE: To get to the old APIs console and prevent the redirect taking you to the new console use this link: https://code.google.com/apis/console/b/0/?noredirect

这篇关于如何在Google云端sql实例上创建数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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