是否可以使用专用网络从Google Compute Engine访问Google Cloud SQL?
Google Cloud SQL似乎可以看到Google Compute Engine实例的公共网络IP.
并且,Web控制台不允许输入实例专用地址.
google-cloud-sql google-compute-engine google-cloud-platform
我的互联网连接有一个动态IP地址,每次重启调制解调器时都会不断更改,因此我很难在Access Control中配置授权网络.
有没有办法更改设置以禁用表名称区分大小写?我知道在.cnf中你所要做的就是添加这个;
lower_case_table_names = 1
Run Code Online (Sandbox Code Playgroud)
虽然我似乎无法找到办法做到这一点.谢谢
与安装了LAMP的GCE相比,选择与Google Cloud SQL链接的GCE实例有什么好处?
我确信GCE是可扩展的,但是安装在它上面的mysql数据库的可伸缩性呢?
使用LAMP在GCE实例上使用mysql数据库备份的可用性如何?
谢谢...
我最近更改了Google Cloud SQL实例的计算机类型,但它并未自动更改故障转移副本的计算机类型.编辑副本时,更改机器类型的按钮显示为灰色.有谁知道如何更改副本的机器类型?
我正在尝试使用第二代云sql并希望更改sql模式.在UI中,我只能将sql_mode设置为下拉列表中的一个值,但不能将其设置为多个(例如,"STRICT_MODE_TRANS,ALLOW_INVALID_DATES").实现这一目标的最佳方法是什么?
干杯,安德烈斯
我正在尝试为GCP/Kubernetes上的气流创建几个部署模板.在该部署中,我寻求部署所有依赖托管服务以及一些必需的用户和密码.
我已经能够部署这些服务,但它在创建两个用户时抱怨缺少"host"参数.此类型在此处记录,不应该抱怨,因为主机列为可选:
https://cloud.google.com/sql/docs/mysql/admin-api/v1beta4/users/insert
所以我试图删除部署,但它永远不会让我完成它,它阻止了它现在可能永远不会删除的两个资源.这是我在控制台中得到的:
$ gcloud deployment-manager deployments delete airflow-on-k8s
The following deployments will be deleted:
- airflow-on-k8s
Do you want to continue (y/N)? y
Waiting for delete [operation-1502140582303-556305bcf9519-0af00aa8-d01c8bf6]...failed.
ERROR: (gcloud.deployment-manager.deployments.delete) Delete operation operation-1502140582303-556305bcf9519-0af00aa8-d01c8bf6 failed.
Error in Operation [operation-1502140582303-556305bcf9519-0af00aa8-d01c8bf6]: errors:
- code: RESOURCE_ERROR
location: /deployments/airflow-on-k8s/resources/root-user
message: '{"ResourceType":"sqladmin.v1beta4.user","ResourceErrorCode":"400","ResourceErrorMessage":{"code":400,"errors":[{"domain":"global","location":"host","locationType":"parameter","message":"Required
parameter: host","reason":"required"}],"message":"Required parameter: host","statusMessage":"Bad
Request","requestPath":"https://www.googleapis.com/sql/v1beta4/projects/<...>/instances/airflow-db-instance4/users"}}'
- code: RESOURCE_ERROR
location: /deployments/airflow-on-k8s/resources/regular-airflow-user
message: '{"ResourceType":"sqladmin.v1beta4.user","ResourceErrorCode":"400","ResourceErrorMessage":{"code":400,"errors":[{"domain":"global","location":"host","locationType":"parameter","message":"Required
parameter: host","reason":"required"}],"message":"Required parameter: host","statusMessage":"Bad
Request","requestPath":"https://www.googleapis.com/sql/v1beta4/projects/<...>/instances/airflow-db-instance4/users"}}'
Run Code Online (Sandbox Code Playgroud)
可能是API中的错误,但如果有人知道某种方式,请告诉我.此外,我听说一些googlers在stackoverflow上闲逛,可能会将此转发给API开发人员.
我已经尝试了几个小时。使用TypeORM的Google Cloud SQL的ormconfig.json文件应该是什么?我设法使其与本地数据库的IP一起使用(使用mysql workbench和Google云代理,并将我的IP列入白名单),但是我不知道应用程序引擎的连接详细信息应该是什么。
{
"name": "default",
"type": "mysql",
"host": "/cloudsql/[project:region:instance]",
"port": "3306",
"username": "root",
"password": "xxxx",
"database": "yyy",
"synchronize": true,
"logging": false,
"entities": [
"modules/**/*.entity.js"
]
}
Run Code Online (Sandbox Code Playgroud)
要么
{
"name": "default",
"type": "mysql",
"extra": {
"socketPath": "/cloudsql/[project:region:instance]"
},
"username": "root",
"password": "xxxx",
"database": "yyy",
"synchronize": true,
"logging": false,
"entities": [
"modules/**/*.entity.js"
]
}
Run Code Online (Sandbox Code Playgroud)
还是其他?
非常感谢!
我正在努力使用Google Cloud Platform的Cloud SQL组件解决此问题。我的技术栈包括将我的应用程序托管在Google Kubernetes Engine(GKE)部署中,使用Cloud SQL代理sidecar连接到Pod中的数据库。后端是一个Symfony项目。
我按照以下步骤创建和填充数据库(没有成功):
phpfpm)窗格并运行命令php bin/console doctrine:schema:update --force以更新架构。查询在数据库中执行,因此创建了架构,依此类推。postgres用户通过GCP中的SQL控制台连接打开数据库,并尝试执行简单的select * from foo;查询。响应是Insufficient privilege: 7 ERROR: permission denied for relation如何与postgres用户查询数据库中的数据?
编辑:
我有关于用户的这种情况:
Role name | Attributes | Member of
-------------------+------------------------------------------------------------+-------------------------------
acando14 | Create role, Create DB | {cloudsqlsuperuser,proxyuser}
cloudsqladmin | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
cloudsqlagent | Create role, Create DB | {cloudsqlsuperuser}
cloudsqlreplica …Run Code Online (Sandbox Code Playgroud) php postgresql symfony google-cloud-sql google-cloud-platform
当我尝试在Cloud SQL实例(PostgreSQL 9.6)上启用私有IP时,出现以下错误消息:
Network association failed due to the following error: set Service Networking service account as servicenetworking.serviceAgent role on consumer project
我有一个VPC,可以从“关联的网络”下拉列表中选择,我也选择了一个已经建立的托管服务网络,因此从理论上讲它应该可以正常工作。
我无法在IAM下找到与错误消息相关的任何信息,无论是服务帐户还是servicenetworking.serviceAgent权限。
更新 包括相关的地形片段
## VPC Setup
resource "google_compute_network" "my_network" {
project = "${var.project_id}"
name = "vpc-play"
auto_create_subnetworks = "false"
routing_mode = "REGIONAL"
}
# There is a bunch of subnets linked to this network which are not included here
## Managed services network
resource "google_compute_global_address" "default" {
name = "google-managed-services-vpc-${var.project_id}"
project = "${var.project_id}"
provider = …Run Code Online (Sandbox Code Playgroud)