2

I am currently setting up an open-source marketing software called Mautic on App Engine Flexible Environment. However, I'm having trouble with connecting the App Engine to the Cloud SQL MySQL database using MySQLi. Mautic is a PHP application built on top of Symfony. I tried using /cloudsql/<instance_connection_name> as the host, but it didn't work.

Does anyone have any experience with deploying Mautic on App Engine or know to address this problem?

slm
  • 7,355
  • 16
  • 54
  • 72
Elisha Lai
  • 21
  • 3

1 Answers1

4

Use this code to connect to your database from App Engine:

$con = mysqli_connect(null, 'root', 'password', 'db_name',null,'/cloudsql/instance_connection_name');