如何在Google应用引擎中将数据库连接到laravel 5.5

时间:2018-03-12 15:59:01

标签: laravel google-app-engine google-cloud-platform

我创建了一个Google Cloud SQL实例,并在Google App Engine上托管了一个laravel项目。但是当我访问我的laravel项目时,它会显示错误数据库连接。

两者都在同一个项目,SQL和laravel。

注意:我启用了Google Cloud SQL API服务。

1 个答案:

答案 0 :(得分:0)

您需要配置laravel项目以使用google cloud sql。应用程序的数据库配置位于config/database.php

您必须使用为google云sql设置的凭据修改该文件。有关如何设置凭据的说明,请访问:

https://docs.bitnami.com/google/how-to/migrate-database-cloud-sql/

相关问题