iT邦幫忙

0

google cloud platform 建立完後卻無法登入雲端的SQL?請問一下有沒有厲害的大大可以幫幫我

如提,小弟第一次用 google cloud platform
我想建個遠端雲開api,再用node自己的mysql連到google的mysql
但是我在google照著步驟做完後
卻發現google cloud platform我打了帳密卻進不去

service: default
runtime: php55
api_version: 1

handlers:

- url: /(.+\.(ico|jpg|png|gif))$
  static_files: \1
  upload: (.+\.(ico|jpg|png|gif))$
  application_readable: true

- url: /(.+\.(htm|html|css|js))$
  static_files: \1
  upload: (.+\.(htm|html|css|js))$
  application_readable: true

- url: /(.+\.php)$
  script: \1
  login: admin

- url: /.*
  script: index.php
  login: admin

app.yaml更改了default

 config.inc.php
<?php
/**
 * Copyright 2016 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 * http://www.question-defense.com/tools/phpmyadmin-blowfish-secret-generator
 */
$cfg['blowfish_secret'] = '{^QP+-(3mlHy+Gd~FE3mN{gIATs^1lX+T=KVYv{ubK*U0V'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;

// Change this to use the project and instance that you've created.
$host = '/cloudsql/{{original-nation-268204:asia-east1:ted198199}}';
$type = 'socket';

/*
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['socket'] = $host;
$cfg['Servers'][$i]['connect_type'] = $type;
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/*
 * End of servers configuration
 */

/*
 * Directories for saving/loading files from server
 */
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

/*
* Other settings
*/
$cfg['PmaNoRelation_DisableWarning'] = true;
$cfg['ExecTimeLimit'] = 60;
$cfg['CheckConfigurationPermissions'] = false;

他的規則
In your web browser, open the blowfish secret generator.

Copy the unique blowfish secret that the page generated.
Be careful to copy the generated secret, not the example secret.

Paste the new secret in place of {{your_secret}} in config.inc.php.

Go to the Cloud SQL instances page in the Cloud Console.

Click the Cloud SQL instance to display its Instance details page.

Replace the value of {{your_connection_string}} (within the $host variable) with the Instance connection name property.

Save the file.

我把config.inc.php{{your_secret}}換成它的金鑰
然後 {{your_connection_string}}換成是我的
如圖
https://imgur.com/Cxrsg6d
網址參考
https://cloud.google.com/sql/docs/mysql/phpmyadmin-on-app-engine?hl=en

請各位大大幫我看看為什麼好了執行
gcloud components update
gcloud app deploy
後出現網址我打帳號密碼卻無法登?

尚未有邦友回答

立即登入回答