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?


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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.